Horje
How to Add the 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.


Example of Adding the lang Attribute

Example: HTML
<html lang="en-us">

Full Example of Adding the lang Attribute

index.html
Example: HTML
<!DOCTYPE html>
<html lang="en-us">
<head>
  <title>Page Title</title>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Output should be:

Full Example of Adding the lang Attribute





Category:
Web Tutorial
Sub Category:
HTML Style Guide
Uploaded by:
Admin


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