CHAPTER 11 CASCADING STYLE SHEETS ORIENTATION

IN THIS CHAPTER

The benefits and power of Cascading Style Sheets (CSS)

How (X)HTML markup creates a document structure

Writing CSS style rules

Attaching styles to the (X) HTML document

The big CSS concepts of inheritance, the cascade, specificity, rule order, and the box model

You’ve seen style sheets mentioned quite a bit already, and now we’ll finally put them to work and start giving our pages some much needed style. Cascading Style Sheets (CSS) is the W3C standard for defining the presentation of documents written in HTML, XHTML, and, in fact, any XML language. Presentation, again, refers to the way the document is displayed or delivered to the user, whether on a computer screen, a cell phone display, or read aloud by a screen reader. With style sheets handling the presentation, (X)HTML can get back to the business of defining document structure and meaning, as intended.

CSS is a separate language with its own syntax. This chapter covers CSS terminology and fundamental concepts that will help you get your bearings for the upcoming chapters, where you’ll learn how to change text and font styles, add colors and backgrounds, and even do basic page layout using CSS. Will you be a style sheet expert by the end of Part III? Probably not. But you will have a solid foundation for further reading, and lots of practice.

NOTE

See the section, Moving Forward with CSS, at the end of this chapter for books and sites that will help you continue ...

Get Learning Web Design, 3rd Edition 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.