5.4. Using CSS and parser on XML documents

5.4.1. Using CSS on XML pages

CSS is considered to be an integral part of all HTML/XHTML documents and used on almost every serious page on the Web. By separating the formatting properties such as color, font, size, background, and border from the markup contents, CSS provides a structural base for all HTML/XHTML documents.

One of the interesting features of CSS is that it can be used to redefine the formatting properties of an HTML/XHTML tag. Consider the following example:

Example. ex05–18.htm – Redefine Formatting Properties Using CSS
 1: <?xml version="1.0" encoding="UTF-8"?> 2: <!DOCTYPE html 3: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 4: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ...

Get Practical Web Technologies 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.