25 lines
586 B
Markdown
25 lines
586 B
Markdown
|
---
|
||
|
title: Lang
|
||
|
---
|
||
|
## Lang
|
||
|
|
||
|
In HTML, Lang tag is used to declare the language of the whole or a part of a web page.
|
||
|
|
||
|
### Examples
|
||
|
|
||
|
```html
|
||
|
<html lang="en">
|
||
|
</html>
|
||
|
```
|
||
|
|
||
|
The lang attribute can also be used to specify the language of a specific element:
|
||
|
|
||
|
```html
|
||
|
<p lang="hi">
|
||
|
फ्री कोड कैंप
|
||
|
</p>
|
||
|
```
|
||
|
|
||
|
In the above example, "hi" denotes the Hindi language. Similarly, you can use "en" for English, "es" for Spanish, "fr" for French and so on.
|
||
|
|
||
|
Refer to [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the appropriate two-digit Language code.
|