How to specify the language of the element's content in HTML?

HTMLWeb DevelopmentFront End Technology

Use the lang attribute to specify the language of the element’s content in HTML. You can try to run the following code to implement the lang attribute − 


Here, we have added content in French and Spanish as well.

<!DOCTYPE html>
      <p lang = "en">This is demo text</p>

      <p lang = "fr">Ceci est un texte de démonstration</p>

      <p lang = "es">Este es un texto de demostración</p>

Updated on 03-Mar-2020 10:02:58