Alt text is required on every image, and the single most useful thing to understand about it is that the correct value is sometimes empty. An empty alt attribute and a missing alt attribute are different things that produce very different results, and knowing which to use when is most of the skill.
What alt text is for
The alt attribute provides a text alternative that serves the same purpose as the image. It is read aloud by screen readers, displayed when an image fails to load, used by search engines to understand what an image depicts, and shown when someone browses with images disabled.
The phrase serves the same purpose matters. Alt text is not a description of the picture, it is a replacement for it. The right question is not what does this image show, but what would I write here if I could not use an image at all.
Decorative images take an empty alt
Many images carry no information. A decorative flourish, a background texture, an icon sitting beside a label that already says the same word. For these, the correct value is an empty string.
<img src="/assets/images/divider.svg" alt=""> An empty alt tells assistive technology to skip the image entirely, which is exactly right. Describing a decorative swirl adds an announcement that interrupts without informing, and a page full of those is tiring to navigate.
Omitting the attribute is not equivalent. With no alt at all, many screen readers fall back to reading out the filename, so a visitor hears a string of characters and a file extension. That is worse than either alternative, and it is why the attribute is required even when the value is nothing.
Do not start with an image of
Screen readers announce that an image is present before reading the alt text. Beginning with a phrase naming it as an image or a picture produces a duplicated announcement. Start directly with the content.
Match the description to the context
The same photograph needs different alt text depending on why it is on the page. A picture of a chair in a furniture shop listing needs the details that matter for buying it. The same picture illustrating an article about a designer needs the details relevant to that argument. In a piece about workshop conditions it might need to describe the room around it.
There is no universally correct description of an image, only a correct description for the job it is doing where it sits.
Length and detail
A sentence is usually right, occasionally two. Alt text is not read in visual chunks the way a caption is, it is heard as a continuous stream, so a long paragraph is difficult to follow and impossible to skim.
Where an image genuinely carries a lot of information, such as a chart or a detailed diagram, the answer is not longer alt text. Give it a short alt naming what it is, and put the full information in the surrounding page content where everyone can read it. A data table beside a chart serves sighted readers and screen reader users equally well.
Images inside links
When a link contains only an image, the alt text becomes the accessible name of the link. An empty alt in that position leaves a link that announces as nothing, which is a dead end for anyone navigating by keyboard.
Describe the destination rather than the picture. A logo linking home is better described by the site name than by the shapes in the graphic, because where the link goes is what the user needs.
Text inside images
If an image contains words, those words belong in the alt text. A banner reading twenty percent off this weekend needs alt text saying exactly that, because otherwise the offer simply does not exist for part of your audience.
Better still, avoid text in images where you can. Real text scales with user preferences, can be selected and translated, stays sharp at any resolution and is indexed properly. Images of text fail on every one of those counts.
Alt text and search
Search engines use alt text to understand images, which is what makes image search work. Writing genuinely descriptive text is the whole technique.
Keyword stuffing an alt attribute is both an accessibility failure and a recognised manipulation pattern. Someone listening to a list of repeated search terms learns nothing, and the practice is old enough that it is well handled. Describe the image accurately and the useful terms appear naturally, because they describe what is actually there.