w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



img lang attribute

The lang attribute on the img element:

Recommendation: specifying the language of the document on the html root element it is considered good practice.

Examples

<imgattribute="value(s)" >Examples
16.lang=language code<img src=".." alt="alt text " lang="en">

Video demonstration img lang attribute

HTML5 img lang attribute Tutorial

min video details
00:06 video tutorial: lang attribute on img
00:11 lang attribute on img allws you to specify the language of the alternative text added as value of the alt attribute
00:15 1st image: the text "coucher de soleil" is in French → the lang="fr"
00:26 2nd image: the text "sky" is in English → the lang="en"
00:34 3rd image: the text "clouds" is in English → the lang="en"
img intro img optional img occurrences img browser display img parents server-side image map (ismap) vs client-side image map (usemap) img syntaximg alt attributeimg ismap attributeimg usemap attributeimg width, height attributesimg src attributeimg accesskey attributeimg class attributeimg draggable attributeimg hidden attributeimg id attributeimg style attributeimg tabindex attributeimg title attributeimg translate attribute