HTML and CSS Reference
In-Depth Information
This is all well and good, but all these <div> is are semantically anonymous; the
browser doesn't see them as a main content column, different Tweets, and so on.
It just sees them as “divs inside divs.” You could upgrade this to HTML5, like so:
<section id=”main”>
>
<!-- post summary -->
>
>
<!-- post summary -->
>
<!-- etc. -->
</section>
<section id=”tweets”>
<article> ... </article>
<article> ... </article>
<article> ... </article>
</section>
Here, a supporting browser immediately knows that this contains two distinct
sections of content. Both contain distinct articles, which could quite sensibly be
syndicated separately, for example, in an RSS feed. This gives you a hint as to the
difference between <section> and <article> . Both elements are for containing
content, but
<section> is for containing conceptually different areas of content within the
page—for example, stories about animals versus animal photos or stories
about animals versus stories about underpants.
<article> is for containing distinct pieces of content within a page or a
<section> , whether they are new items, videos, Tweets, or whatever. Each
group of <article> s will have similar, related functionality or purpose but
will be self-contained entities. If you could happily take a piece of content
Search WWH ::




Custom Search