Expand description
Attribute names for link (<link>) elements.
§Purpose
The <link> element specifies relationships between the current document
and external resources, most commonly used to link stylesheets, icons,
and web app manifests.
§Common Attributes
href: URL of the linked resourcerel: Relationship type (stylesheet, icon, preload, etc.)type: MIME type hint for the resourcemedia: Media query for when the resource appliesintegrity: Subresource integrity hash for security
§Example
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="preload" href="font.woff2" as="font" type="font/woff2" crossorigin>
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="print.css" media="print">§WHATWG Specification
Constants§
- AS
- The
asattribute. - CROSSORIGIN
- The
crossoriginattribute. - HREF
- The
hrefattribute. - INTEGRITY
- The
integrityattribute. - MEDIA
- The
mediaattribute. - REFERRERPOLICY
- The
referrerpolicyattribute. - REL
- The
relattribute. - SIZES
- The
sizesattribute. - TYPE
- The
typeattribute.