Chapter 2
Styling the Page with CSS
IN THIS CHAPTER
Understanding cascading style sheets
Learning the three methods you can use to add a style sheet
Applying styles to web page elements
Working with fonts and colors
Taking advantage of selectors and other style sheet timesavers
HTML elements enable Web-page designers to mark up a document’s structure, but beyond trust and hope, you don’t have any control over your text’s appearance. CSS changes that. CSS puts the designer in the driver’s seat.
— HÅKON WIUM LIE, THE “FATHER” OF CSS
One of the things that makes web coding with HTML so addictive is that you can slap up a page using a few basic tags and, when you examine the result in the browser, it usually works pretty good. A work of art it’s not, but it won’t make your eyes sore. That basic functionality and appearance are baked-in courtesy of the default formatting that all web browsers apply to various HTML elements. For example, <strong> text appears in a bold font, there's a ...
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