HTML <img> longdescAttribute

HTML img 标签参考手册HTML <img> Tag

Examples

Use the longdesc attribute to point to a page that contains a long description of the image:

<img src="logo.png" alt="example.com" width="336" height="69" longdesc="w3s.txt">

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Almost all mainstream browsers do not support the longdesc attribute.


Definition and Usage

HTML5 does not support the <img> longdesc attribute.

The longdesc attribute specifies the URL of a page that contains a long description of the image.

Tip:Due to very poor browser support for the longdesc attribute, it is not necessary to use it. If you need to provide a long description for an image (if necessary), simply create a link to the description page (this link is visible to everyone).


Syntax

<img longdesc="URL">

Attribute Values

Value Description
URL The URL pointing to the image description page.

Possible values:

  • Absolute URL - points to another website (e.g., longdesc="http://www.example.com/description.txt")
  • Relative URL - points to a file within the website (e.g., longdesc="description.txt")


HTML img 标签参考手册HTML <img> Tag Other Extensions