longdesc (HTML attribute)

Depr. Version
No HTML 4.01
Browser support (more…)
IE8 FF2 SA4 OP10 CH2
None None None None None


longdesc="Long description of iframe content"


For non-visual browsers (for example, people accessing web content using screen reader software), it can be difficult to understand what the embedded iframe content is used for. The simplest way to identify an iframe’s content/purpose is with the title attribute (as shown in the example, it should only be a brief description - a helpful summary rather than an unnecessarily overcomplicated hurdle). In order to provide more information/orientation for non-visual browsers, you may use the longdesc attribute to point to a file that contains a complete description of the iframe’s purpose or content.


The longdesc attribute refers to a text file "stocks.txt":

<iframe src="stock-prices.php" height="200" width="200"
frameborder="1" title="The latest stock prices, including Nikkei,
FTSE100" longdesc="stocks.txt">


URL for a file which contains the extra descriptive text, most likely a simple .txt file.


Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
None None None None None None None None None None None None None None None

The longdesc attribute has almost zero practical use, even with today’s good standards-aware browsers. Despite the best intentions, no browser on the support charts makes it clear to the user when there is extra information for the iframe in the form of a descriptive text file. But why would they need to, though? If you can see the content, the content effectively explains itself! This attribute really is not aimed at sighted users, hence the lack of support.

User-contributed notes

There are no comments yet.

Related Products