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>
Reffered: https://www.w3schools.com/html/html_attributes.asp





Related Articles
What is 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
What is HTML Headings HTML Attributes
How to create HTML Headings HTML Attributes
What is Headings Are Important HTML Attributes
How to create HTML Bigger Headings HTML Attributes

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

Read Full:
HTML Attributes
Category:
Web Tutorial
Sub Category:
HTML Attributes
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
160



Share on: