Name
link
Synopsis
<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 style sheet.
Attributes
Core(id
,
class
, style
, title
),
Internationalization,
Events
-
charset="
charset
"
Specifies the character encoding of the target document. See Chapter 6 for information on character sets.
-
href="
URL
"
Identifies the target document.
-
hreflang="
language code
"
Specifies the base language of the target document. See Chapter 6 for a list of two-letter language codes.
-
media="all|screen|print|handheld|projection|tty|tv|projection|braille|aural"
Identifies the target medium for the linked document so an alternate style sheet can be accessed. The
media
attribute is explained in more detail in Chapters 16 and 36.-
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.
Get Web Design in a Nutshell, 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.