HTML <link> Tag
<link> HTML element is often used for linking to an external style sheet, but it can also be used for other purposes such as assisting search engines by providing links to relevant resources, and providing information on the website's navigational structure, etc.
- Permitted Parents
- Any element that accepts metadata elements. If itemprop is present: any element that accepts phrasing content
- None. It is an empty element.
- Start/End Tags
- Start tag: required, End tag: forbidden
<link rel="stylesheet" type="text/css" href="style.css" />
|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.
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.|
<link> tag also supports the Global Attributes in HTML5
<link> tag also supports the Event Attributes in HTML5
|Tablets / Mobile|