O'Reilly logo

Real World XML by Steven Holzner

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

Selecting Elements in Stylesheet Rules

This chapter is dedicated to understanding how to create stylesheets. After going through the mechanics, we'll first see a lot of examples at work; then we'll spend some time with the actual CSS specification.

I'll start by taking a look at how to create selectors, which indicate what element or elements you want to attach a style rule to. In the stylesheet we've already seen, ch09_02.css, the selectors are of the simplest kind and select just one element by giving the name of that element:

 TITLE {display: block; font-size: 24pt; font-weight: bold; text-align: center; text-decoration: underline} AUTHOR {display: block; font-size: 18pt; font-weight: bold; text-align: center} SECTION {display: block; font-size: ...

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