Skip to main content

The <link> Element

As defined in the HTML Living Standard, the <link> element defines a relationship between the current document and an external resource. It is a void element and must be placed within the <head>.

Common Usage:
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="favicon.ico">
<link rel="canonical" href="https://example.com/page">

The <link> tag is essential for loading the styles and metadata that make a page functional and accessible.

View HTML Living Standard: The link element

Accessibility Impact: Stylesheets & Performance

While the <link> tag itself is invisible, the resources it loads are critical for accessibility.

WCAG Requirement: Contrast & Visuals

Success Criterion 1.4.3 (Level AA): Contrast (Minimum).

If a <link rel="stylesheet"> fails to load, the page reverts to browser defaults. While the content remains accessible, the visual hierarchy and contrast ratios may be compromised. Ensuring your critical CSS is linked correctly is the first step in meeting visual accessibility standards.

Understand SC 1.4.3: Contrast (Minimum)

Key Attributes for Accessibility

A11y Tip: Preloading Critical Assets

Using <link rel="preload" as="style"> for your main design system CSS prevents the "Flash of Unstyled Content" (FOUC). This provides a more stable and predictable experience for users who rely on consistent visual cues.