You are here: Reference > JavaScript > client-side > HTML DOM > properties > longDesc (frame, iframe, img)

longDesc property (frame, iframe, img)

Browser support:
Specifies or retrieves the URI (Uniform Resource Identifier) of the long description of a frame, iframe or img element.
The longDesc property of an element contains a link to a file describing the object in detail, for those times when the object cannot be downloaded or displayed.
The functionality of this property is not implemented in browsers, use the title property for a shorter description instead.

Syntax:

object.longDesc;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: longDesc

Possible values:

String that sets or retrieves the Uniform Resource Identifier. If the value is an URL, then it can be an absolute or relative path as well. Relative paths are relative to the base URL. The base URL is the location of the current document, but it can be overridden by the base tag.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the longDesc attribute:
<img src="area.gif" id="myImg" height="504px" width="126px" longdesc="longdescs.htm" />
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the longDesc property:
<head>
    <script type="text/javascript">
        function ChangeLongDesc () {
            var image = document.getElementById ("myImg");
            image.longDesc = "longdescs2.htm";
        }
    </script>
</head>
<body>
    <img src="area.gif" id="myImg" height="504px" width="126px" longdesc="longdescs.htm" />
    <button onclick="ChangeLongDesc ();">Change longDesc!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

External links:

User Contributed Comments

Post Content

Post Content