HTML and CSS Reference
In-Depth Information
Setting up Alternative Style Sheets
Many browsers recognize alternative style sheets. This is particularly useful in situations
when you are supporting users who have special needs, such as a need for large text
with highly contrasting colors. To support these users, you can make an alternative style
sheet with the link element, using the code
<link href=” url1 ” rel=”alternate stylesheet”
type=”text/css” title=” title1 ” />
<link href=” url2 ” rel=”alternate stylesheet”
type=”text/css” title=” title2 ” />
where url1 , url2 , and so forth are the URLs of the style sheet files, and title1 ,
title2 , etc. are the titles of the alternate style sheets. For example, the following HTML
code creates links to two style sheets, named Large Text and Regular Text :
<link href=”large.css” rel=”alternate stylesheet”
type=”text/css” title=”Large Text” />
<link href=”regular.css” rel=”alternate stylesheet”
type=”text/css” title=”Regular Text” />
Browsers that support alternative style sheets provide a menu option or toolbar that
enables users to select which style sheet to apply. Among current browsers, Firefox,
Opera, and Safari support alternate style sheets.
Working with Web Fonts
Text design on the Web largely has been limited to a few Web safe fonts that are sup-
ported by all major browsers. It would be better if a browser would automatically down-
load whatever fonts are required for a Web page in the same way it downloads images.
Specifi cations for downloadable fonts, or Web fonts , have been around for several years,
but most browsers have begun to support this technology only in recent years. However,
different browsers support different font fi le formats. Figure 3-38 describes these different
formats and their current levels of browser support.
Figure 3-38
Web font formats
Format
Description
Browser
TrueType/OpenType
The most common font format, freely
available on most computers; no support
for licensing.
Chrome, Firefox, Opera, Safari
Embedded OpenType
Proprietary format developed by
Microsoft for Internet Explorer; supports
licensing and security against unauthor-
ized use.
Internet Explorer
Scalable Vector Graphics
An XML vocabulary designed to describe
resizable graphics and primarily sup-
ported by mobile browsers.
Chrome, Opera, Safari
Web Open Font Format
A new standard for Web fonts that is
quickly gaining support; provides sup-
port for font licensing.
Firefox, other browsers in
development
 
Search WWH ::




Custom Search