What HTML attribute on an <img> tag provides alternative text for accessibility?

The story behind the answer

The HTML attribute on an `<img>` tag that provides alternative text for accessibility is `alt`.

The `alt` value supplies a short textual replacement for an image when it cannot be displayed and gives screen readers useful information about the image's purpose. For example, a meaningful image might use `alt="A red bicycle beside a lake"`, while a purely decorative image should generally use an empty value, `alt=""`, so assistive technology can skip it.

The attribute is often confused with `title`, which may provide advisory text or a tooltip but is not a substitute for accessible alternative text. The `src` attribute identifies the image file; it does not describe what the image means. A longer explanation should normally be provided in surrounding page content rather than forcing a short `alt` value to carry too much detail.

The attribute appeared in the HTML 1.2 draft in 1993 and became required for `<img>` and `<area>` in HTML 4.01, released in 1999. Its accessibility role remains central to image-friendly web design.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: