Latest web development tutorials

HTML img longdesc attribute

HTML img tag Reference Manual HTML <img> tag

Examples

Use longdesc attribute points to a page with a long description of the image:

<img src="w3html.gif" alt="W3CSchool.cc" longdesc="w3s.txt">

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Almost all of the major browsers do not support the longdesc attribute.


Definition and Usage

HTML5 does not support the <img> longdesc attribute.

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

Tip: Because of browser support for the longdesc attribute is very poor, there is no need to use this property. To provide a long description of an image (if necessary), simply create a link to a page description (the link is visible to anyone).


grammar

<img longdesc="URL">

Property Value

描述
URL 指向图像描述页面的 URL。

可能的值:

  • 绝对 URL - 指向另一个网站(比如 longdesc="http://www.example.com/description.txt")
  • 相对 URL - 指向网站内的一个文件(比如 longdesc="description.txt")


HTML img tag Reference Manual HTML <img> tag