Prev | Current Page 37 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"


Right now, we are going to focus on the individual XHTML tags and
their semantic meaning, so that you can consider any piece of content
that will appear on your page and select the most appropriate
tag to mark it up. As we do this, we can also think about the concept
of document ?¬‚ ow.
Document Flow??”Block and Inline
Elements
I mentioned previously that most XHTML tags fall into two broad
categories in respect to the way they display on the page: block and
inline. Block level elements such as headings

through


and paragraphs

will obligingly stack down the page with no
line breaks required. They even have preset margins to create space
between them. Inline elements have no such margins, and sit side
by side across the page, only wrapping to the next line if there is not
enough room for them to sit next to each other.
A SIMPLE EXAMPLE OF XHTML MARKUP
In this ?¬? rst simple example of an XHTML page, the screenshot
shows not only the stacking effect of block level elements, but also
that inline elements, in this case (a link) and (usually
displays bold), can appear within block level elements and don??™t
create new lines (Figure 1.3 on the next page).
XHTML: GIVING STRUCTURE TO CONTENT 19
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.


Pages:
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49