Document Metadata
Use the <link> element to link a document to other resources. It's usually (but not always) used in the <head> section.
Attributes for <link>
Type | Attribute List |
'Standard' Attributes | "href", "hreflang", "media", "rel", and "type" |
New HTML5 Attributes | "as", "blocking", "color", "crossorigin", "disabled", "imagesizes", "imagesrcset", "integrity", "referrerpolicy", and "sizes" |
Obsolete Attributes | "charset", "methods", "rev", "target", and "urn" |
Notes
- The <link> element can be used to link a stylesheet. Example:
<link href="/mainstyles.css" type="text/css" rel="stylesheet">
Recommended Links
Accessibility Information & Tips
- Consider using the <link> element with the "rel" attribute to provide metadata about the position of web pages that are part of collection. For example, specify the URLs to the next, previous, and content pages. Visit https://www.w3.org/TR/WCAG20-TECHS/H59 for more information. Consider also linking to a glossary page if appropriate. Visit https://www.w3.org/TR/WCAG20-TECHS/H60 for more information.
Search Engine Links (for more information)