XML technologies / CSS / Advanced websites with CSS / Behind the scenes / Selectors and the structure of CSS rules
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
As explained in Parts of a CSS rule, each style rule has two parts: a selector that specifies the HTML element for the rule, and a series of property and value declarations defining the CSS style.
So far, we have considered only selectors containing a single HTML element:
h1 {
font-size: 120%;
text-transform: capitalize;
}However, selectors can also contain several HTML elements:
h1, h2, h3 {
font-size: 120%;
text-transform: capitalize;
}The following pages examine all types of selectors available in CSS.
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