CSS HTML Validator - The fast, all-in-one, HTML, CSS, Link, SEO, spelling, and accessibility checker for Windows, & htmlval for Mac and Linux
Home Help: <link> element

The <link> Element

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>
TypeAttribute 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"


  • 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)

Help us improve this page: Suggest a link or noteReport a problem