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  

HTML5 Global Attributes:
  1. The accesskey Attribute
  2. The class Attribute
  3. The contenteditable Attribute
  4. The contextmenu Attribute
  5. The dir Attribute
  6. The draggable Attribute
  7. The dropzone Attribute
  8. The hidden Attribute
  9. The id Attribute
  10. The lang Attribute
  11. The spellcheck Attribute
  12. The style Attribute
  13. The tabindex Attribute
  14. The title Attribute
Related: