Inside a CSS Style Sheet

If you don't have any experience with CSS, you'll be glad to know that it is very simple in structure. A CSS style sheet consists of rules that determine how a given set of styles is applied to a document. The application of style rules is determined by selectors, which are CSS constructs that identify portions of an HTML or XML document. A selector establishes the link between an HTML or XML document and a style or set of styles. There are three kinds of selectors used in CSS:

  • Element type

  • Attribute class

  • Attribute ID

The element type selector simply selects an element of a given type and applies a style or set of styles to it. This is the simplest approach to using CSS because there is a simple one-to-one mapping between ...

Get XML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.