The lang Attribute
The lang attribute specifies the language of an element's contents. You can use the lang attribute to select content in a given language and the apply a style.
The value for the lang attribute must be a valid ISO language code.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
<p lang="en">Hello - how are you?</p>
<p lang="fr">Bonjour - comment tes-vous?</>
</body>
</html>
Home
HTML CSS Book
HTML
HTML CSS Book
HTML
HTML5 Global Attributes:
- The accesskey Attribute
- The class Attribute
- The contenteditable Attribute
- The contextmenu Attribute
- The dir Attribute
- The draggable Attribute
- The dropzone Attribute
- The hidden Attribute
- The id Attribute
- The lang Attribute
- The spellcheck Attribute
- The style Attribute
- The tabindex Attribute
- The title Attribute
Related: