Horje
How to create lang Attribute

You should always include the lang attribute inside the <html> tag, to declare the language of the Web page. This is meant to assist search engines and browsers.

The following example specifies English as the language:


Sample of HTML lang Attribute


<html lang="en">

Full Example of HTML lang Attribute


<!DOCTYPE html>
<html lang="en">
<body>
...
</body>
</html>

Full Example of HTML Country lang Attribute

Country codes can also be added to the language code in the lang attribute. So, the first two characters define the language of the HTML page, and the last two characters define the country. The following example specifies English as the language and United States as the country:

<!DOCTYPE html>
<html lang="en-US">
<body>
...
</body>
</html>





Related Articles
HTML Attributes HTML Attributes
How to create HTML href Attribute HTML Attributes
How to create HTML src Attribute HTML Attributes
How to create HTML width and height Attributes HTML Attributes
How to create HTML alt Attribute HTML Attributes
How to create HTML style Attribute HTML Attributes
How to create lang Attribute HTML Attributes
How to create HTML title Attribute HTML Attributes
How to create HTML Single or Double Quotes HTML Attributes
HTML Headings HTML Attributes
How to create HTML Headings HTML Attributes
Headings Are Important HTML Attributes
How to create HTML Bigger Headings HTML Attributes

Single Articles
Sample of HTML lang Attribute HTML Attributes
Full Example of HTML lang Attribute HTML Attributes
Full Example of HTML Country lang Attribute HTML Attributes

Category :
Web Tutorial
Sub Category :
HTML Attributes
Uploaded by :
Admin


Read Article
https://horje.com/learn/1434/reference