- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.
Example
Here, we have added content in French and Spanish as well.
<!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émonstration</p> <h2>Spanish</h2> <p lang="es">Este es un texto de demostración</p> </body> </html>
Advertisements