lang attribute is used to specify the language code for an element’s contents.
Sample Coding for lang Attribute in HTML:
Tryit<!DOCTYPE html><html><head><title>Wikitechy lang attribute</title></head><body><h2>This is a HTML lang attribute example</h2><h3lang="es">Bienvenido a Wikitechy!</h3></body></html>
Code Explanation for lang Attribute in HTML:
lang attribute declared within the <h3> tag to define the language as “es” (spanish).
Output for lang Attribute in HTML:
The output shows the Spanish content. But the lang attribute value not visible to user that will be used to search engine for regional search results.
Browser Support for lang Attribute in HTML:
Yes
Yes
Yes
Yes
Yes
ISO Language Code:
Based on the w3c recommendations we should declare base or primary language for website and it should reflect in all the web pages.
html5 lang attributehtml lang en-auhtml lang multiple languagesfour attributes of languagehtml lang attribute seoattributes of human languagehtml lang attribute englishhtml lang attribute multiple languageshtml attributeshtml tutorialshtml editorhtml codehtml formhtmltutorialhtml colorhtml color codeshtml tablehtml imghtml5html code for websitehtml and csshtml programshtml websitefree html editorhtml5 tutorialwysiwyg html editorhtml tutorial pdfhtml converterphp tutorialhtml examplehtml tutorialcss tutorialhtml csshtml tagshtml basicscode htmlhtml onlinehtml mailtohtml langhtml tags list