ویژگی longdesc <img> HTML
Definition and usage
longdesc
The attribute specifies the hyperlink to the detailed description of the image.
detail
<img> tag's longdesc
The attribute is with alt attribute similarly, but it allows for longer descriptive text.longdesc
The value is a URL pointing to the document containing the image description. If the description is more than 1024 characters, then you can use longdesc
The attribute to set the link to it.
Neither HTML nor XHTML specifies what must be in the description, and currently browsers do not support longdesc
The attribute. Therefore, for creating those large descriptions, our recommendation is to create a hyperlink to the page containing the description.
alt
The attribute is very helpful for the disabled, and for obvious reasons,longdesc
The attribute seems to be a better option.
Example
Several examples of how to use the longdesc attribute:
<!-- The description is on the same page as the image --> <img src="w3html.gif" alt="W3Schools.com" width="100" height="132" longdesc="#w3htmlExplained"> <!-- The description is on the external page --> <img src="w3html.gif" alt="W3Schools.com" width="100" height="132" longdesc="w3html.txt"> <!-- This description is one of many in an external page --> <img src="w3html.gif" alt="W3Schools.com" width="100" height="132" longdesc="http://example.com/desc#item3"> <!-- The description is included in the data:URI --> <img src="w3html.gif" alt="W3Schools.com" width="100" height="132" longdesc="data:text/html;charset=utf-8;,%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3EDescription%20of%20the%20Logo%3C/title%3E%3C/head%3E%3Cbody%3E%3Cp%3ESome%20description%20goes%20here%3C/body%3E%3C/html%3E">
جملات دستور زبان
<img longdesc="string">
مقدار ویژگی
مقدار | توضیح |
---|---|
string |
تعریف یک پیوند به توضیحات دقیقتر تصویر. ممکنهیاردها:
|
پشتیبانی از مرورگر
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
پشتیبانی نمیشود | پشتیبانی نمیشود | پشتیبانی نمیشود | پشتیبانی نمیشود | پشتیبانی نمیشود |