Selecting Elements in Style Sheet Rules
This chapter is dedicated to understanding how to create style sheets. After going through the mechanics, we'll see a lot of examples at work and then spend some time with the actual CSS specification.
I'll start by taking a look at how to create selectors, which indicate the element or elements to which you want to attach a style rule. In the style sheet we've already seen, style.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: ...
Get Inside XML 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.