- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 10 Jan 2012 23:49:45 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv4810
Modified Files:
Overview.html
Log Message:
Add a big example to <p> to help authors who want to use logical paragraphs rather than structural ones. (whatwg r6887)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5484
retrieving revision 1.5485
diff -u -d -r1.5484 -r1.5485
--- Overview.html 10 Jan 2012 23:31:58 -0000 1.5484
+++ Overview.html 10 Jan 2012 23:49:41 -0000 1.5485
@@ -10508,7 +10508,7 @@
half of the second paragraph. It straddles the paragraphs and the
heading.</p>
- <pre><aside>
+ <pre><header>
Welcome!
<a href="about.html">
This is home of...
@@ -10516,19 +10516,19 @@
The Lockheed Martin multirole jet fighter aircraft!
</a>
This page discusses the F-16 Fighting Falcon's innermost secrets.
-</aside></pre>
+</header></pre>
<p>Here is another way of marking this up, this time showing the
paragraphs explicitly, and splitting the one link element into
three:</p>
- <pre><aside>
+ <pre><header>
<p>Welcome! <a href="about.html">This is home of...</a></p>
<h1><a href="about.html">The Falcons!</a></h1>
<p><a href="about.html">The Lockheed Martin multirole jet
fighter aircraft!</a> This page discusses the F-16 Fighting
Falcon's innermost secrets.</p>
-</aside></pre>
+</header></pre>
</div><div class="example">
@@ -15959,6 +15959,63 @@
</footer>
</section></pre>
+ </div><div class="note">
+
+ <p>List elements (in particular, <code><a href="#the-ol-element">ol</a></code> and
+ <code><a href="#the-ul-element">ul</a></code> elements) cannot be children of <code><a href="#the-p-element">p</a></code>
+ elements. When a sentence contains a bulleted list, therefore, one
+ might wonder how it should be marked up.</p>
+
+ <div class="example">
+ <p>For instance, this fantastic sentence has bullets relating to</p>
+ <ul><li>wizards,
+ <li>faster-than-light travel, and
+ <li>telepathy,
+ </ul><p>and is further discussed below.</p>
+ </div>
+
+ <p>The solution is to realise that a <i><a href="#paragraph">paragraph</a></i>, in HTML
+ terms, is not a logical concept, but a structural one. In the
+ fantastic example above, there are actually <em>five</em> <a href="#paragraph" title="paragraph">paragraphs</a> as defined by this
+ speciication: one before the list, one for each bullet, and one
+ after the list.</p>
+
+ <div class="example">
+
+ <p>The markup for the above example could therefore be:</p>
+
+ <pre><p>For instance, this fantastic sentence has bullets relating to</p>
+<ul>
+ <li>wizards,
+ <li>faster-than-light travel, and
+ <li>telepathy,
+</ul>
+<p>and is further discussed below.</p></pre>
+
+ </div>
+
+ <p>Authors wishing to conveniently style such "logical" paragraphs
+ consisting of multiple "structural" paragraphs can use the
+ <code><a href="#the-div-element">div</a></code> element instead of the <code><a href="#the-p-element">p</a></code> element.</p>
+
+ <div class="example">
+
+ <p>Thus for instance the above example could become the following:</p>
+
+ <pre><div>For instance, this fantastic sentence has bullets relating to
+<ul>
+ <li>wizards,
+ <li>faster-than-light travel, and
+ <li>telepathy,
+</ul>
+and is further discussed below.</div></pre>
+
+ <p>This example still has five structural paragraphs, but now the
+ author can style just the <code><a href="#the-div-element">div</a></code> instead of having to
+ consider each part of the example separately.</p>
+
+ </div>
+
</div><h4 id="the-hr-element"><span class="secno">4.5.2 </span>The <dfn><code>hr</code></dfn> element</h4><dl class="element"><dt>Categories</dt>
<dd><a href="#flow-content">Flow content</a>.</dd>
<dt>Contexts in which this element can be used:</dt>
Received on Tuesday, 10 January 2012 23:49:47 UTC