Alternative Text for Images is referred to as alt text. Picture alt text is used to describe what is in an image for those who use a screen reader to view a website.
Why is alt text important?
1. Accessibility – A fundamental of accessible web design is alt text. Its initial (and still major) use is to describe visuals to visitors who are blind. This includes picture-blocking screen readers and browsers, as well as people who are blind or otherwise unable to visually recognize an image. By including alt text with your photographs, all viewers, regardless of visual ability, will be able to appreciate your site’s content.
2. Image SEO – Using alt text on your photos not only improves the user experience, but it may also help you gain SEO benefits, both explicit and implicit. Along with the following recommended practices for picture title and file name, inserting alt text can help with image SEO. While image recognition technology has dramatically improved over time, search crawlers still can’t “see” the images on a website page as humans can, so it’s not a good idea to rely completely on them for interpretation. It’s conceivable that if they don’t understand or get it incorrect, you’ll either rank for unexpected keywords or miss out entirely.
You may use alt text to incorporate your target keyword yet again. With on-page keyword usage being a ranking factor for search engines, it’s in your best interest to generate alt text that explains the picture while also include, if feasible, a keyword or keyword phrase you’re targeting.
How to write good alt-text?
Please be as descriptive as possible when describing the image. First and foremost, alt text is intended to give text descriptions of pictures for people who are blind or visually impaired. If an image has no relevance or value and is only there for decorative purposes, it should be included in the CSS rather than the HTML.
Make it (relatively) brief. Because the majority of screen readers cut off alt text at roughly 125 characters, it’s best to limit it to that length or fewer.
Make use of your keywords. Alt text gives you still another chance to incorporate your target term on a page, and therefore another chance to tell search engines that your website is highly relevant to a certain search query. While explaining and contextualising the picture should be your main goal, if it makes sense, put your keyword in the alt text of at least one image on the page.
Keyword stuffing should be avoided. Google will not penalize you for bad alt text, but you will be penalized if you use it as a chance to jam as many relevant keywords as possible into it. Leave it at that. Concentrate on crafting meaningful alt text that gives context to the image and, if feasible, enter your goal keyword.
Images should not be used as text. This is more of a general SEO-friendly site-building guideline than an alt text-specific best practice. You should avoid using images in place of words since search engines can’t comprehend text within images. If necessary, use your alt text to describe what your photo says.
Example of ALT text:

Okay alt text: <img src="bird.png" alt="Rooster">
Better alt text: <img src="bird.png" alt="Rooster crowing">
Best alt text: <img src="bird.png" alt="Red-crested rooster crowing">