HTML and CSS Reference
In-Depth Information
Let's say you run a large online newspaper and naturally wish to
syndicate this story. When the magic syndication machines slot
it into your template, the resulting code is
<h1>The Monotonous Times</h1>
<section>
<h2>Breaking news</h2>
<article>
<h1>What I did on my holiday</h1>
<p>I went to Narnia. I was bitten by a trilobite.
¬ Then I came home.</p>
</article>
..
</section>
It's obvious that “breaking news” is higher in the hierarchy of
headings than the title of Remy's blog post, but due to a mis-
match between Remy's template and your template, there's an
<h2> that is more important than the <h1> .
Checking the outline, however, shows us that everything is as it
should be ( Figure 2.7 ). You clever thing, you.
FIguRE 2.7 The outlining
algorithm produces the correct
outline in syndication, too.
1. The Monotonous Times
1. Breaking news
1. What I did on my holiday
<nav>, <aside>, and untitled sections
A quick word about the outlining tools, as you'll probably get
into the habit of checking your document outlines as part of
your development process, much as you regularly validate your
code and check it in different browsers.
Generally, if a tool finds sectioning content that has no heading,
it will report it. So this snippet
<article>
<p>I have no heading</p>
</article>
gives the outline “Untitled Section.” For <section> s and
<article> is this is a useful warning, as these elements nearly
always begin with a heading.
However, inside <nav> and <aside> it's perfectly legitimate not
to have a heading. You may want to do it for some <nav> blocks,
 
Search WWH ::




Custom Search