How to add multi-language content in HTML?

The lang attribute in HTML allows you to set content for languages other than English. You can try to run the following code to implement 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: 29-May-2020

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started