The HTML5 link Tag
There are some occasions when it is necessary for the author of the HTML document to establish a connection between the web page and another document. During such instances, the HTML5 <link> tag is used. That way, when users access the web page, they can easily go to the other document which is directly connected to the current document.
The main difference in use of HTML5 <link> tag is that the HTML4.01 attributes are totally not supported by HTML5 anymore. Plus, HTML5 added the size attribute.
There should be no worries when using the HTML5 <link> tag. It is possible to pair it up with the Events Attributes and Global Attributes in HMTL5. Aside from that, all major web browsers support this tag like Internet Explorer, Google Chrome, Firefox, Safari and Opera.
The attributes for HTML5 <link> tag are these:
Attribute |
Value |
Description |
charset |
char_encoding |
This is no longer supported and utilized in HTML5 |
href |
URL |
It is important in giving the specific location of the other document that is linked |
hreflang |
language_code |
It is the key in determining the type of language of the text that is used in the linked document |
media |
media_query |
Determines the kind of device on which the document that is linked can be viewed |
rel |
alternate |
This is required because it establishes the connection between the current document and the document that is linked |
rev |
reversed relationship |
This is no longer supported and utilized in HTML5 |
sizes (New) |
HeightxWidth |
It is the key in determining the size of the other resource that is connected to the HTML document but this is only applicable for rel="icon" |
target |
_blank |
This is no longer supported and utilized in HTML5 |
type |
MIME_type |
It is used in determining the MIME type of the document that is linked |