HTML and CSS Reference
In-Depth Information
<link lang="hu" title="A dokumentum magyarul"
rel="alternate"
xml:lang="hu"
href="http://example.com/hungarian/" />
</head>
The character encoding of the page specified as the link target can be declared by the charset attribute.
The media attribute specifies the medium the link applies to. Table 3-17 summarizes the possible values.
Table 3-17. Values of the media Attribute on the link Element
Value
Description
screen
Computer screens (default)
tty
TeleTypes (fixed character width)
tv
Televisions and similar devices (low resolution, limited scrollability)
projection
Projectors
handheld
Mobile devices, smartphones (small screens, limited bandwidth)
print
Print preview/printed pages
braille
Braille devices
aural
Speech synthesizers
all
S uitable for all devices
Listing 3-44 shows an example for three different style sheets written for three different media types
( all , handheld , print ).
Listing 3-44. CSS Files for Different Media Types
<link rel="stylesheet" type="text/css" media="all" href="main.css"
title="Default style" />
<link rel="stylesheet" type="text/css" media="handheld" href="mobile.css"
title="Styles for mobile devices" />
<link rel="stylesheet" type="text/css" media="print" href="print.css"
title="Styles for printing" />
The rel attribute (which stands for relationship) is a space-separated list of one or more values specifying the
relationship between the current page and the target resource (Listing 3-45). Possible values are alternate , appendix ,
bookmark , chapter , contents , copyright , glossary , help , index , next , prev , section , stylesheet , and subsection .
Listing 3-45. Application Example for the rel Attribute
<link rel="alternate" type="application/rss+xml" title="New feed of example page"
href="http://www.example.com/rss.xml" />
<link rel="glossary" title="Glossary" href="glossary/" />
<link rel="copyright" title="Copyright" href="copy/" />
 
 
Search WWH ::




Custom Search