Link element
The HTML link element declares a relationship between a document and an external resource, such as a stylesheet or icon.
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 to an external style sheet or a hosted font resource through a link in the head.
- How deep it goes
- Shows link syntax and several href paths, then walks through pasting a font-host link; does not examine browser internals.
- Examples
- Uses same-directory, subdirectory, root-relative, and remote stylesheet links, plus a Google Fonts link for Lato.
- What you can do after
- Operate/configure it by placing a stylesheet or font-host link in the head and choosing an appropriate href.
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 →
Also covered in
- Robotics for ProgrammersIn early access (MEAP)
- Django in Action
- Tiny CSS Projects
What to know first
- HTMLHTML is the standard markup language for structuring content and elements in documents on the web.
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- head elementThe HTML head element contains document metadata and references to resources, such as stylesheets and scripts, rather than the document’s main content.
Related concepts
- external stylesheetused by · An external stylesheet is a separate CSS resource linked to a document to provide style rules.
- 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.
- stylesheetuses · A stylesheet is a text document containing CSS rules that specify the visual presentation of structured documents and their elements.
- Tag Helpersused by · Tag Helpers are ASP.NET Core components that process HTML-like elements during Razor view or page rendering.
Questions about link element
What is link element?
The HTML link element declares a relationship between a document and an external resource, such as a stylesheet or icon.
Which Manning books explain link element?
Web Design Playground, Web Design Playground, Second Edition and Build a Website with ChatGPT.
What should I know before learning link element?
Manning books that teach link element usually introduce HTML, CSS, bold and head element first.
What are the parts of link element?
Link element includes href and rel attribute.
What is link element also called?
Link element is also called link tag.
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.


