Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML img longdesc attribute

HTML The longdesc attribute

HTML img Tag Reference HTML tag

Example

Using the longdesc attribute to point to a page with a long description of the image:

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

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Almost no major browser supports the longdesc attribute.


Definition and Usage

HTML5 does not support The longdesc attribute.

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

**Tip:** Since browser support for the longdesc attribute is very poor, there is no need to use it. To provide a long description for an image (if necessary), simply create a link to the description page (a link that is visible to everyone).


Syntax

Attribute values

Value Description
URL The URL of the page describing the image.

Possible values:

  • Absolute URL - points to another website (such as longdesc="http://www.example.com/description.txt")
  • Relative URL - points to a file within the website (for example longdesc="description.txt")
  • |

    HTML img Tag Reference HTML tag