hreflang attribute is used to identify the language
of text used in the linked document—the document that’s referenced in the
href attribute. It’s not used to identify
the language of the text contained within the
itself—that would use the
hreflang is defined in this link to the cakes list
page, as they’re special Japanese cakes:
<a href="cakes-ja.html" charset="euc-jp" hreflang="ja">lovely range of Japanese cakes (note: this link will take you to a page in Japanese language)</a>
This attribute takes a two-letter language code as its value.
None of the browsers tested appear to do anything to notify the user that the linked document would display in any special or different language. However, authors may still be able to use this attribute for their own purposes, as a hook for styling or scripting. For example, you might use CSS (with attribute selector) to style such links with flag icons to represent the particular language used in the destination file.
There are no comments yet.