Link element
The HTML link element declares a relationship between a document and an external resource or resource metadata.
Web Design Playground
An HTML element that defines a link to an external resource and can also connect a document to a stylesheet or other relationship via attributes.
- How it is used
- Connects a page’s head section to external CSS files and hosted web-font stylesheets.
- How deep it goes
- Explains same-directory, subdirectory, root-relative, and remote href paths, plus the HTML4.01-to-HTML5 type attribute change.
- Examples
- Uses styles.css paths, a remote Google Fonts URL, and Lato regular, italic, and bold variants.
- What you can do after
- Apply it via a font host’s generated tag or by writing a stylesheet reference in the head section.
Web Design Playground, Second Edition
The HTML link element declares a relationship between the current document and an external resource such as a style sheet or hosted font resource.
- How it is used
- Attaches external stylesheets or hosted font resources to an HTML page through its head section.
- How deep it goes
- Explains relationship and path attributes, placement, several URL forms, shared CSS benefits, and hosted-font trade-offs.
- Examples
- Uses local CSS paths, a remote stylesheet URL, and Google Fonts links for the Lato typeface.
- What you can do after
- Apply it via HTML to attach shared CSS files and hosted fonts in a page head.
Read how Web Design Playground, Second Edition explains link element →
Build a Website with ChatGPT
A link element is an HTML element that declares a relationship between a document and an external resource such as a stylesheet.
- How it is used
- Connects an HTML page to CSS files and external fonts while building generated websites.
- How deep it goes
- Defines href and rel through working snippets, but stops short of browser loading internals.
- Examples
- Uses styles.css, Google Fonts URLs, index.html, and a generated information website home page.
- What you can do after
- Apply it via HTML to connect a page with a stylesheet or external font resource.
Read how Build a Website with ChatGPT explains link element →
Related concepts
- external styleused by · An external style is a stylesheet stored as a separate resource and linked to one or more documents.
- hrefhas part · The href attribute of an HTML anchor specifies the destination resource, URL, or fragment of a hyperlink.
- Google Fontsuses · Google Fonts is an online catalog and delivery service providing openly licensed typefaces and resources for using them in websites and applications.
- Tag Helpersused by · Tag Helpers are ASP.NET Core components that process HTML-like elements during Razor view or page rendering.
- stylesheetuses · A stylesheet is a text document containing CSS rules that specify the visual presentation of structured documents and their elements.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


