Skip to content

Commit

Permalink
[e] (0) Add an example for <nav>; fix a note for <dl>.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@1253 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 26, 2008
1 parent e6df043 commit f1a7fb6
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 4 deletions.
41 changes: 39 additions & 2 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -8309,7 +8309,44 @@ people expect to have work and what is necessary.

<p>The <code><a href="#nav">nav</a></code> element represents a section of
a page that links to other pages or to parts within the page: a section
with navigation links.
with navigation links. Not all groups of links on a page need to be in a
<code><a href="#nav">nav</a></code> element &mdash; only sections that
consist of primary navigation blocks are appropriate for the <code><a
href="#nav">nav</a></code> element. In particular, it is common for
footers to have a list of links to various key parts of a site, but the
<code><a href="#footer">footer</a></code> element is more appropriate in
such cases.

<div class=example>
<p>In the following example, the page has several places where links are
present, but only one of those places is considered a navigation section.</p>

<pre>&lt;body>
&lt;header>
&lt;h1>Wake up sheeple!&lt;/h1>
&lt;p>&lt;a href="news.html">News&lt;/a> -
&lt;a href="blog.html">Blog&lt;/a> -
&lt;a href="forums.html">Forums&lt;/a>&lt;/p>
&lt;/header>
&lt;nav>
&lt;h1>Navigation&lt;/h1>
&lt;ul>
&lt;li>&lt;a href="articles.html">Index of all articles&lt;/a>&lt;li>
&lt;li>&lt;a href="today.html">Things sheeple need to wake up for today&lt;/a>&lt;li>
&lt;li>&lt;a href="successes.html">Sheeple we have managed to wake&lt;/a>&lt;li>
&lt;/ul>
&lt;/nav>
&lt;article>
&lt;p>...<em>page content would be here</em>...&lt;/p>
&lt;/article>
&lt;footer>
&lt;p>Copyright &copy; 2006 The Example Company&lt;/p>
&lt;p>&lt;a href="about.html">About&lt;/a> -
&lt;a href="policy.html">Privacy Policy&lt;/a> -
&lt;a href="contact.html">Contact Us&lt;/a>&lt;/p>
&lt;/footer>
&lt;/body></pre>
</div>

<h4 id=the-article><span class=secno>3.8.4 </span>The <dfn
id=article><code>article</code></dfn> element</h4>
Expand Down Expand Up @@ -10041,7 +10078,7 @@ I first lived there):&lt;/p>
<code><a href="#dt">dt</a></code> elements, then the last group has no
associated value.

<p class=note>Such mistakes are often due to using accidentally <code><a
<p class=note>Such mistakes are often due to accidentally using <code><a
href="#dd">dd</a></code> elements in the place of <code><a
href="#dt">dt</a></code> elements and vice versa. Conformance checkers can
spot such mistakes and might be able to advise authors how to correctly
Expand Down
43 changes: 41 additions & 2 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -6698,7 +6698,46 @@ people expect to have work and what is necessary.

<p>The <code>nav</code> element represents a section of a page that
links to other pages or to parts within the page: a section with
navigation links.</p>
navigation links. Not all groups of links on a page need to be in a
<code>nav</code> element &mdash; only sections that consist of
primary navigation blocks are appropriate for the <code>nav</code>
element. In particular, it is common for footers to have a list of
links to various key parts of a site, but the <code>footer</code>
element is more appropriate in such cases.</p>

<div class="example">

<p>In the following example, the page has several places where
links are present, but only one of those places is considered a
navigation section.</p>

<pre>&lt;body>
&lt;header>
&lt;h1>Wake up sheeple!&lt;/h1>
&lt;p>&lt;a href="news.html">News&lt;/a> -
&lt;a href="blog.html">Blog&lt;/a> -
&lt;a href="forums.html">Forums&lt;/a>&lt;/p>
&lt;/header>
&lt;nav>
&lt;h1>Navigation&lt;/h1>
&lt;ul>
&lt;li>&lt;a href="articles.html">Index of all articles&lt;/a>&lt;li>
&lt;li>&lt;a href="today.html">Things sheeple need to wake up for today&lt;/a>&lt;li>
&lt;li>&lt;a href="successes.html">Sheeple we have managed to wake&lt;/a>&lt;li>
&lt;/ul>
&lt;/nav>
&lt;article>
&lt;p>...<em>page content would be here</em>...&lt;/p>
&lt;/article>
&lt;footer>
&lt;p>Copyright &copy; 2006 The Example Company&lt;/p>
&lt;p>&lt;a href="about.html">About&lt;/a> -
&lt;a href="policy.html">Privacy Policy&lt;/a> -
&lt;a href="contact.html">Contact Us&lt;/a>&lt;/p>
&lt;/footer>
&lt;/body></pre>

</div>


<h4>The <dfn><code>article</code></dfn> element</h4>
Expand Down Expand Up @@ -8212,7 +8251,7 @@ I first lived there):&lt;/p>
<code>dt</code> elements, then the last group has no associated
value.</p>

<p class="note">Such mistakes are often due to using accidentally
<p class="note">Such mistakes are often due to accidentally using
<code>dd</code> elements in the place of <code>dt</code> elements
and vice versa. Conformance checkers can spot such mistakes and
might be able to advise authors how to correctly use the markup.</p>
Expand Down

0 comments on commit f1a7fb6

Please sign in to comment.