In this section, you will see the use of <link> tag in HTML5.
In this section, you will see the use of <link> tag in HTML5.The <link> tag is used for adding external document in this document,
and it specifies the relationship from external document. It can be use inside head
document of html page. With the help of href attribute, we assign address of
external document for link tag. If href is not present in
link tag, then the
element does not define a link.
You can use number of link tag. Each link works separately. It separates website
design and code.
Attribute | Value | Description |
href | URL | Address of external document . |
rel | alternate archives author first help icon index last license next pingback prefetch prev search stylesheet sidebar tag up |
Define the relationship between current document and external document. |
media | all aural braille handheld projection screen tty tv |
Define media on which document can display. |
hreflang | two-character ISO code of language. | Define the language of external document |
type | text/css text/asp text/plain text/JavaScript text/scriptlet text/vbscript etc |
Define the MIME type of external document. |
sizes | number | Specifies the size of external document if it is a icon. |
|
<!DOCTYPE html> <html > <head> <title>Example of link tag</title> <link href="extranal.css" type="text/css" rel="stylesheet" > <link href="RoseIndia.css" type="text/css" rel="stylesheet"> </head> <body> <p>Example of link tag.</p> <div class="Roseindia" style="height: 78px; width: 269px" ></div> <font class="bharat">Bharat Singh</font> </body> </html> |
No difference.