Name
link — <link />
Defines the relationship between the current document and another document. Although it can signify such relationships as index, next, and previous, it is most often used to link a document to an external stylesheet.
Attributes
Core, Internationalization, Events
charset="
charset
"
Specifies the character encoding of the target document.
href="
URL
"
Identifies the target document.
hreflang="
language code
"
Specifies the base language of the target document.
media="all|screen|print|handheld|projection|tty|tv|projection|braille|aural"
Identifies the target medium for the linked document so that an alternate stylesheet can be accessed.
rel="
relationships
"
Describes one or more relationships from the current source document to the target. Common relationship types include
stylesheet
,next
,prev
,copyright
,index
, andglossary
.rev="
relationships
"
Specifies one or more relationships of the target document back to the source (the opposite of the
rel
attribute).target
="
name
"
Defines the default target window for all links in the document. Often used to target frames.
type="
resource
"
Shows the media or content type of an outside link. The value
text/css
indicates that the linked document is an external Cascading Style Sheet.
Example
<head>
<link rel="stylesheet" href="/pathname/stylesheet.css" type="text/css" />
</head>
Get HTML and XHTML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.