This is because
a browser has a built-in style sheet that sets each element??™s default
font size, color (type is black, links are blue, for example), display setting
(block or inline), and usually many other settings, too.
When you use CSS to style an element, you are actually overriding
the default settings for that element as set in the browser??™s style
sheet. This makes the job easier, as you only need to change the
styles that aren??™t already to your liking. However, if the browser
doesn??™t read your style sheet for some reason, these default styles
are your fallback, so it??™s worth making sure that your marked-up, but
unstyled, page displays meaningfully in the browser before you start
on the CSS. If it??™s well-formed XHTML, the default document ?¬‚ ow
pretty much guarantees it will.
A MORE STRUCTURED XHTML PAGE
Here??™s a more extensive example (Figure 1.4) of a marked-up page
that uses some common XHTML tags and also organizes the tags
into logical groups using div tags based on their purpose in the
page. We will look at more XHTML tags as we go on. I don??™t want to
get into a full-blown rundown of each XHTML tag and its associated
attributes here, as it would be a book in its own right, but I will show
you examples of many different tags and their uses throughout
this book.
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51