Home > Web Front-end > HTML Tutorial > How to add multilingual content in HTML?

How to add multilingual content in HTML?

WBOY
Release: 2023-08-25 16:49:19
forward
1537 people have browsed it

How to add multilingual content in HTML?

The lang attribute in HTML allows you to set content for languages ​​other than English. You can try running the following code to implement the lang attribute.

Example

Here, we also have French and Spanish.

<!DOCTYPE html>
<html>
   <body>
      <h2>English</h2>
      <p lang="en">This is demo text</p>
     
      <h2>French</h2>
      <p lang="fr">Ceci est un texte de d&eacute;monstration</p>
     
      <h2>Spanish</h2>
      <p lang="es">Este es un texto de demostraci&oacute;n</p>
   </body>
</html>
Copy after login

The above is the detailed content of How to add multilingual content in HTML?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template