Chapter 3. CSS
In the previous chapter, we learned how to create HTML documents using HTML elements and attributes. We can even include images and links to other documents and images. But when you look at the result on a screen, you are probably disappointed. I hope you are, because that was done on purpose (oops, I almost said by design, but the design part is what this chapter is all about). When I wrote my first web pages, I was disappointed too, in particular when discovering how hard it was to do something that should be simple: putting a photograph on a page and some text right next to it. Well now, it's time to turn disappointment into excitement!
In this chapter, we will learn how to add the presentation part—in other words the layout—to our web pages, using Cascading Style Sheets (CSS). Style sheets are a common feature in Desktop Publishing software. They allow you to specify (or modify) the style of a section of a certain kind in your document: for...