XML technologies / CSS / Advanced websites with CSS / Using fonts with CSS / How CSS handles fonts
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
CSS opens unexpected possibilities for HTML designers working with fonts. HTML offers only seven font sizes, for example, while CSS provides an almost unlimited scaling range. Defining alternative typefaces also greatly improves compatibility across systems. (Note: Alternative fonts could already be defined with the HTML tag <font>, but this was never part of the official standard.) CSS also has dedicated values for font weight, italics and even small capitals.
Since CSS was introduced, the HTML tag <font> has officially been deprecated and fully replaced by the broad range of font properties. This chapter uses the following:
font-familyfont-sizefont-stylefont-variantfont-weightfont(shorthand)
Combining these properties gives us a large repertoire for styling and controlling text display. First, however, let us examine them individually.
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg
back to top