a hreflang Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:a

Description

The hreflang attribute sets the language of the linked document.

Attribute Values

Value Description
language_code A two-letter language code that specifies the language of the linked document.

The hreflang attribute specifies the language of the document in the link:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p><a hreflang="en" href="http://java2s.com">site</a></p>

</body><!--from w  w w.j a v a  2  s.com-->
</html>

Related Tutorials