HTML and CSS Reference
In-Depth Information
Ta k e a l of of k a t t h e m a i n c of n t e n t a r e a of f a b l of g (
Figure 2.1
).
There may be multiple articles, each containing “metadata” and
the actual textual content of that article.
FIGURE 2.1
A series of articles
on a typical blog.
Here's some typical markup (simplifi ed from the default Word-
Press theme)
<div class=”post”>
<h2>Memoirs of a Parisian lion-tamer</h2>
<small>January 24th, 2010</small>
<div class=”entry”>
<p>Claude Bottom's poignant autobiography is this
¬
summer's must-read.</p>
</div>
<p class=”postmetadata”>Posted in <a href=”/?cat=3”>
¬
Books category</a> | <a href=”/?p=34#respond”>
¬
No Comments</a></p>
</div>
There is nothing major wrong with this markup (although we
query use in HTML 4 of the presentational
<small>
element
for the date). It will work fi ne in “HTML5” browsers, but apart
from the heading for the blog post, there is no real structure—
just meaningless
<div>
s and paragraphs. HTML 4 gives us
generic structures to mark up content.
<div>
, for example, is