HTML and CSS Reference
In-Depth Information
/* Temporarily hiding these rules
h4 { font-size: 100%; }
h5 { font-size: 90%; }
h6 { font-size: 80%; }
End hiding */
Comment liberally. Unless you're strictly building personal websites for yourself, you should always strive
to make your code (HTML and CSS both) easy to understand for other people who may wind up working
with it. Comments can also be handy notes to yourself so when your revisit a style sheet a few months or
years down the road, you can remember why you did things the way you did them.
Summary
This chapter has covered a lot of ground to get you up to speed on the inner workings of HTML and CSS.
You've learned the basics of authoring HTML, using tags to define elements and adding attributes to relay
more information about them. Throughout the rest of this topic, you'll become intimately familiar with most
of the elements you'll use when you create your own web pages.
The second part of this chapter gave you a crash course in CSS, unveiling the mechanics of this rich and
powerful language. You learned about CSS selectors and how specificity and the cascade work together
to give you great control over how your content is presented. You'll use HTML to build the structure that
supports your content, and then use CSS to apply a separate layer of polished presentation. In the
following chapters, you'll see glimpses of how you can use CSS in different ways to create different visual
effects. Chapter 9 will delve a bit deeper to show you a few ways to use CSS to lay out your pages by
placing elements where you want them to appear on-screen, all without damaging their underlying
structure. Then in Chapter 10 you'll get to see some more of the bells and whistles CSS3 puts at your
fingertips.
From here on, we'll assume you've reached an understanding of the basic rules of syntax for authoring
your own HTML and CSS, and the rest of this topic will dig into the real meat of markup. To get things
rolling, Chapter 3 examines the document itself and how different elements relate to each other.
Onward, true believer!
 
Search WWH ::




Custom Search