HTMLImageElement: longDesc property - Web APIs | MDN

Value

A string which may be either an empty string (indicating that no long description is available) or the URL of a file containing a long form description of the image's contents.

Examples

Consider the following older HTML:

html

<img
  src="taco-tuesday.jpg"
  alt="Taco Tuesday"
  longdesc="image-descriptions/taco-tuesday.html" />

Here, the longDesc is used to indicate that the user should be able to access a detailed description of the image taco-tuesday.jpg in the HTML file image-descriptions/taco-tuesday.html.

This should be converted into the following HTML:

html

<a href="image-descriptions/taco-tuesday.html">
  <img src="taco-tuesday.jpg" alt="Taco Tuesday" />
</a>

With that, the image is a link to the HTML file describing the image in more detail.

Specifications

Specification
HTML
# dom-img-longdesc

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.