Chapter 2

Styling the Page with CSS

IN THIS CHAPTER

Bullet Understanding cascading style sheets

Bullet Learning the three methods you can use to add a style sheet

Bullet Applying styles to web page elements

Bullet Working with fonts and colors

Bullet 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 ...

Get Web Coding & Development All-in-One For Dummies, 2nd 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.