O'Reilly logo

Sams Teach Yourself XML in 10 Minutes by Andrew H. Watt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using CSS Rules with XML

A CSS style sheet is made up of rules.

A rule is the association of an element type name, a class, or other part of an XML document with a CSS declaration.

If an XML document includes a title element and you want the text content to be displayed at a font size of 24 points, you could write this:

title {font-size:24pt} 

CSS Syntax

Whether it is internal (in a style element) or external, a CSS style sheet consists of rules. The following CSS rule associates the Arial font of size 36 with the h1 element:

h1 {font-family:Arial, sans-serif; 
font-size:36;} 

The part of the rule outside the curly brackets is called a

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required