Home Tutorial Html Html5 Hreflang Attribute, Use of hreflang attribute of anchor tag in HTML5.

 
 

Share on Google+Share on Google+
Hreflang Attribute, Use of hreflang attribute of anchor tag in HTML5.
Posted on: August 31, 2010 at 12:00 AM
Advertisement
In this tutorial, you will see the use of hreflang attribute of anchor tag in HTML5.

Hreflang Attribute, Use of hreflang attribute of anchor tag in HTML5.

In this tutorial, we will see the use of hreflang attribute and how to implement. Hreflang gives the language of linked document. This attribute can be used when href attribute is available.

hreflang Attribute :
Attribute Value Description
hreflang  language_code (ISO code) Define the language of linked document. It is two latter ISO code of language.


Declaration Syntax :

Declaration syntax of hreflang attribute in anchor tag.

                           <a hreflang="language code">Text Area</a>

Example of hreflang attribute:

Code:

hrefLangAttribute.html

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<b>hreflang attribute of anchor tag in HTML5.</b>
<ul>

<li>
<a href="http://www.roseindia.net/" hreflang="en">
Language of specified document is english.</a></li>

</ul>
</body>
</html>
Output:

Note: See the browser compatible page for successfully rendering the program.

Download this code

Advertisement

Related Tags for Hreflang Attribute, Use of hreflang attribute of anchor tag in HTML5.:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: August 31, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com