Global lang Attribute - HTML CSS HTML Global Attribute

HTML CSS examples for HTML Global Attribute:lang

Description

The lang attribute specifies the language of the element's content.

For examples, "en" for English, "es" for Spanish, "fr" for French, and so on.

Attribute Values

Value Description
language_code Specifies the language code for the element's content.

The following code shows how to set text in a paragraph in french.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p>This is a paragraph.</p>
<p lang="fr">Ceci est un paragraphe.</p>

</body><!--  w ww  . j a v  a  2 s  .  co  m-->
</html>

Related Tutorials