XML technologies / CSS / Advanced websites with CSS / CSS property reference / font-style
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property font-style describes the style of a font in a text element. Text can be displayed as normal, oblique or italic.
Inherited: yes
See also: font
Values
normal, oblique or italic.
Default value: normal
Compatibility
CSS version: 1
Works in all CSS-capable browsers. Most browsers simply slant a normal font if no separate italic font is available. Most browsers also use oblique as a synonym for italic. Both values produce simple italics.
Example
Most browsers’ default stylesheets display text emphasised with the element em in italics. To change the style, first set font-style to normal and use the property text-decoration to underline the text:
em {
font-style: normal;
text-decoration: underline;
}
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