W3Schools.com

HTML <img> longdesc Attribute

HTML img Tag Reference HTML <img> tag

Example

Use of the longdesc attribute, to point to a page with a long description of an image:

<img src="w3html.gif" alt="W3Schools.com" longdesc="w3s.txt" />

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The longdesc attribute is not supported by any of the major browsers.


Definition and Usage

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

Tip: The longdesc attribute is so poorly supported that it should not be used. To offer a long description of an image, simply create a link (that is visible to anyone) to a page with the description.


Syntax

<img longdesc="URL" />

Attribute Values

Value Description
URL An URL to a page that describes the image.

Possible values:

  • An absolute URL - points to another web site (like longdesc="http://www.example.com/description.txt")
  • A relative URL - points to a file within a web site (like longdesc="description.txt")


HTML img Tag Reference HTML <img> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE