lang tag or Attribute in html

The lang attribute allows you to indicate the main language used in a document. It was kept in XHTML only for backwards compatibility with earlier versions of HTML, and has been replaced by the xml: lang attribute in new XHTML documents.

The lang attribute was designed to offer language – specific display to users, although it has little effect in the main browsers. The real benefits of using the lang attribute are with search engines.

The values of the lang attribute are ISO – 639 standard two – character language codes. If you want to specify a dialect of the language, you can follow the language code with a dash and a subcode name.

For Example:-

ar Arabic
en English
en U. S. English
zh Chinese

Author: Ramesh Saini

Leave a Reply

Your email address will not be published. Required fields are marked *