Syntax - Tasty Web Development Treats

Hasty Treat - The Weird and Wonderful Link Tag

Aug 16, 2021
Dive into the quirky world of the link tag, a hidden gem in HTML! Discover its true purpose beyond hyperlinks, as it links stylesheets, web fonts, and favicons. Learn how it helps preload and prefetch resources, drastically improving user experience. The hosts also shed light on the powerful 'rel' attribute, enhancing resource loading efficiency and security. Uncover tips to engage with this versatile tool and elevate your web development game!
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Link Tag Purpose

  • The link tag isn't for anchor links, as its name might imply.
  • It establishes relationships between an HTML document and external resources.
ADVICE

Linking CSS

  • Use the rel="stylesheet" attribute in the link tag to load CSS files.
  • Add a media attribute for conditional CSS loading (e.g., media="print").
INSIGHT

Media Types

  • The CSS link tag supports various media types, including print, screen, speech, and more.
  • Some older media types, like projection and TV, are now deprecated.
Get the Snipd Podcast app to discover more snips from this episode
Get the app