Accessibility
What is alt text?
Alt text is a text alternative that communicates an image's relevant information or function when someone cannot see it, with wording chosen for the image's purpose in that particular page.
By Plainview WebReviewed
The meaning
In HTML, an image's alternative text normally goes in its alt attribute. Screen readers can use that text when presenting the page. A useful alternative conveys what the image contributes, so its wording depends on context rather than describing every visible detail.
Different images need different treatment. An informative photograph may need a short description. An image that acts as the only label for a link or button needs an alternative explaining its function. An image used purely as decoration should usually have an empty alt attribute, written as alt="", so assistive technology can skip it.
An example
Example: a fictional furniture product page
<img src="/images/oak-desk.jpg"
alt="Oak writing desk with two drawers and tapered legs">On this fictional product page, the photograph shows the desk's shape and storage. The alternative identifies those useful features. It does not add an unsupported claim about durability or repeat a promotional slogan.
The same photograph could need different wording in an article about a particular joinery detail. If an image contains a chart or complex instructions, a short alternative alone may be insufficient; provide the detailed information in accessible page content too.
When it matters
Image alternatives help people access information and operate controls without relying on sight. Consider them while choosing images and writing the page, when the purpose of each image is clear. Leaving the task until upload time makes it easier to substitute a filename or a generic description.
A markup checker can flag a missing attribute or other common issues. It cannot reliably decide whether the words convey the right meaning. Read the page with the image's role in mind and review meaningful alternatives as part of broader accessibility checks.
A common confusion
Every image does not need a spoken description
An empty alternative can be correct for decoration or redundant imagery. Omitting the attribute is different and can produce unhelpful announcements. Equally, adding keywords to every image does not make those alternatives useful; describe the information or action the reader needs.