link element | link object
[This documentation is preliminary and is subject to change.]
Enables the current document to establish links to external documents.
![]() ![]() |
Standards information
- Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5
- HTML 4.01 Specification, Section 12.3
HTML information
| Closing Tag | forbidden |
|---|---|
| CSS Display |
DOM Information
Inheritance Hierarchy
Node
Element
HTMLElement
link
Remarks
The link element can be used only within the head tag.
Windows Internet Explorer 8 and later. The behavior of the href and the rel attributes depends on the current document compatibility mode.
Examples
This example uses the link element to apply an external style sheet, called styles.css, to the page.
<link rel=stylesheet href="styles.css" type="text/css">
Build date: 3/8/2012

