HTML <link> Tag
Description:
The <link> tag is used for defining a link to an external document. It is placed in in the <head> section of the document.
Specific Attributes:
None
Other Attributes:
| Attribute | Definition |
| dir |
Specifies the text direction for the content in
an element.
|
| class | Specifies a classname for an element. |
| id | Specifies a unique id for an element. |
| lang | Specifies a language code for the content in an element. |
| title | Specifies a title to associate with the element. Many browsers will display this when the cursor hovers over the element (similar to a "tool tip"). |
| style | Specifies an inline style for an element. |
| href | Specifies the location of a Web resource, thus defining a link between the current element (the source anchor) and the destination anchor defined by this attribute. |
| hreflang | Specifies the base language of the resource designated by href and may only be used when href is specified. |
| type | The MIMEtype of content at the link destination |
| rel | Describes the relationship between the current
document and the destination URI.
|
| rev | Describes a reverse between the destination URI
and the current document. Possible values:
|
| target |
Specifies the target frame to load the page into.
|
| media | Specifies the device the document will be
displayed on. Possible values:
|
| charset | Specifies the character encoding of the resource designated by the link. |
Example Code:
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>