O'Reilly logo

Head First HTML and CSS, 2nd Edition by Eric Freeman, Elisabeth Robson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Getting Started with CSS: Adding a Little Style

image with no caption

I was told there’d be CSS in this book. So far you’ve been concentrating on learning HTML to create the structure of your web pages. But as you can see, the browser’s idea of style leaves a lot to be desired. Sure, we could call the fashion police, but we don’t need to. With CSS, you’re going to completely control the presentation of your pages, often without even changing your HTML. Could it really be so easy? Well, you are going to have to learn a new language; after all, Webville is a bilingual town. After reading this chapter’s guide to learning the language of CSS, you’re going to be able to stand on either side of Main Street and hold a conversation.

You’re not in Kansas anymore

You’ve been a good sport learning about markup and structure and validation and proper syntax and nesting and compliance, but now you get to really start having some fun by styling your pages. But no worries, all those HTML push-ups you’ve been doing aren’t going to waste. In fact, you’re going to see that a solid understanding of HTML is crucial to learning (and using) CSS. And learning CSS is just what we’re going to do over the next several chapters.

Just to tease you a bit, on these two pages we’ve sprinkled a few of the designs you’re going to work with in the rest of the book. Quite a difference from the pages you’ve been creating so far, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required