Chapter 2. How CSS Works
IN THE PREVIOUS CHAPTER, I showed you how XHTML markup provides a structural hierarchy to your document. We saw that elements have a basic set of styles applied to them by the browser, and that each element is either displayed as a block (stacked) or inline (side-by-side) element. If correctly marked up, the document will then automatically lay out in a useable way down the page—an effect know as document flow. However, “useable” doesn’t mean “beautiful,” so CSS enables creative people like you to change the browser’s default styles and apply additional styles to create a more functional and aesthetically pleasing result for your visitors. This chapter will teach you the mechanics of CSS, and by the end of this chapter, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access