HTML <link> tag
HTML <link> tag : Definition
• The <link> tag specifies the relationship between the current document and an external resource.
• The <link> tag is mostly used to link an external style sheets.
• This <link> element can be used multiple times and goes only in the head section.
Html <link> tag example
<!DOCTYPE html> <html> <body> <link rel="stylesheet" type="text/css" href="styles.css"> </body> </html>
Attributes of link
Attribute | Values | Description |
---|---|---|
href | URL | Specifies the location of the linked document. |
rel | icon,preload,stylesheet etc. | Defines the relationship between the current document and the external linked document. |
media | media_query | Defines on what device the external linked document will be shown. |
title | Defines a preferred or an alternate stylesheet. | |
type | media_type | Specifies the media type of the linked document. |