[html5] r1965 - [act] (0) Make <a> elements not define paragraphs, allowing them to straddle par [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Jul 30 15:27:35 PDT 2008
Author: ianh
Date: 2008-07-30 15:27:34 -0700 (Wed, 30 Jul 2008)
New Revision: 1965
Modified:
index
source
Log:
[act] (0) Make <a> elements not define paragraphs, allowing them to straddle paragraphs.
Modified: index
===================================================================
--- index 2008-07-30 22:14:36 UTC (rev 1964)
+++ index 2008-07-30 22:27:34 UTC (rev 1965)
@@ -8369,11 +8369,15 @@
<p>Paragraphs in <a href="#flow-content0">flow content</a> are defined
relative to what the document looks like without the <code><a
- href="#ins">ins</a></code> and <code><a href="#del">del</a></code>
- elements complicating matters. Let <var title="">view</var> be a view of
- the DOM that replaces all <code><a href="#ins">ins</a></code> and <code><a
- href="#del">del</a></code> elements in the document with their contents.
- Then, in <var title="">view</var>, for each run of <a
+ href="#a">a</a></code>, <code><a href="#ins">ins</a></code> and <code><a
+ href="#del">del</a></code> elements complicating matters, since those
+ elements, with their hybrid content models, can straddle paragraph
+ boundaries.
+
+ <p>Let <var title="">view</var> be a view of the DOM that replaces all
+ <code><a href="#a">a</a></code>, <code><a href="#ins">ins</a></code> and
+ <code><a href="#del">del</a></code> elements in the document with their
+ contents. Then, in <var title="">view</var>, for each run of <a
href="#phrasing0">phrasing content</a> uninterrupted by other types of
content, in an element that accepts content other than <a
href="#phrasing0">phrasing content</a>, let <var title="">first</var> be
@@ -8381,11 +8385,11 @@
node of the run. For each run, a paragraph exists in the original DOM from
immediately before <var title="">first</var> to immediately after <var
title="">last</var>. (Paragraphs can thus span across <code><a
- href="#ins">ins</a></code> and <code><a href="#del">del</a></code>
- elements.)
+ href="#a">a</a></code>, <code><a href="#ins">ins</a></code> and <code><a
+ href="#del">del</a></code> elements.)
- <p>A <a href="#paragraph">paragraph</a> is also formed by <code><a
- href="#p">p</a></code> elements.
+ <p>A <a href="#paragraph">paragraph</a> is also formed explicitly by
+ <code><a href="#p">p</a></code> elements.
<p class=note>The <code><a href="#p">p</a></code> element can be used to
wrap individual paragraphs when there would otherwise not be any content
@@ -8420,6 +8424,36 @@
</section></pre>
</div>
+ <div class=example>
+ <p>In the following example, the link spans half of the first paragraph,
+ all of the header separating the two paragraphs, and half of the second
+ paragraph.</p>
+
+ <pre><aside>
+ Welcome!
+ <a href="about.html">
+ This is home of...
+ <h1>The Falcons!</h1>
+ The Lockheed Martin multirole jet fighter aircraft!
+ </a>
+ This page discusses the F-16 Fighting Falcon's innermost secrets.
+</aside></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>
+ <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>
+ </div>
+
+ <p class=note>Generally, having elements straddle paragraph boundaries is
+ best avoided. Maintaining such markup can be difficult.
+
<h3 id=apis-in><span class=secno>3.6 </span>APIs in HTML documents</h3>
<p>For <a href="#html-">HTML documents</a>, and for <a
Modified: source
===================================================================
--- source 2008-07-30 22:14:36 UTC (rev 1964)
+++ source 2008-07-30 22:27:34 UTC (rev 1965)
@@ -6375,23 +6375,27 @@
stanza in a poem.</p>
<p>Paragraphs in <span>flow content</span> are defined relative to
- what the document looks like without the <code>ins</code> and
- <code>del</code> elements complicating matters. Let <var
- title="">view</var> be a view of the DOM that replaces all
- <code>ins</code> and <code>del</code> elements in the document with
- their contents. Then, in <var title="">view</var>, for each run of
- <span>phrasing content</span> uninterrupted by other types of
- content, in an element that accepts content other than
- <span>phrasing content</span>, let <var title="">first</var> be the
- first node of the run, and let <var title="">last</var> be the last
- node of the run. For each run, a paragraph exists in the original
- DOM from immediately before <var title="">first</var> to immediately
- after <var title="">last</var>. (Paragraphs can thus span across
- <code>ins</code> and <code>del</code> elements.)</p>
+ what the document looks like without the <code>a</code>,
+ <code>ins</code> and <code>del</code> elements complicating matters,
+ since those elements, with their hybrid content models, can straddle
+ paragraph boundaries.</p>
- <p>A <span>paragraph</span> is also formed by <code>p</code>
- elements.</p>
+ <p>Let <var title="">view</var> be a view of the DOM that replaces
+ all <code>a</code>, <code>ins</code> and <code>del</code> elements
+ in the document with their contents. Then, in <var
+ title="">view</var>, for each run of <span>phrasing content</span>
+ uninterrupted by other types of content, in an element that accepts
+ content other than <span>phrasing content</span>, let <var
+ title="">first</var> be the first node of the run, and let <var
+ title="">last</var> be the last node of the run. For each run, a
+ paragraph exists in the original DOM from immediately before <var
+ title="">first</var> to immediately after <var
+ title="">last</var>. (Paragraphs can thus span across
+ <code>a</code>, <code>ins</code> and <code>del</code> elements.)</p>
+ <p>A <span>paragraph</span> is also formed explicitly by
+ <code>p</code> elements.</p>
+
<p class="note">The <code>p</code> element can be used to wrap
individual paragraphs when there would otherwise not be any content
other than phrasing content to separate the paragraphs from each
@@ -6427,7 +6431,41 @@
</div>
+ <div class="example">
+ <p>In the following example, the link spans half of the first
+ paragraph, all of the header separating the two paragraphs, and
+ half of the second paragraph.</p>
+
+ <pre><aside>
+ Welcome!
+ <a href="about.html">
+ This is home of...
+ <h1>The Falcons!</h1>
+ The Lockheed Martin multirole jet fighter aircraft!
+ </a>
+ This page discusses the F-16 Fighting Falcon's innermost secrets.
+</aside></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>
+ <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>
+
+ </div>
+
+ <p class="note">Generally, having elements straddle paragraph
+ boundaries is best avoided. Maintaining such markup can be
+ difficult.</p>
+
+
<h3>APIs in HTML documents</h3>
<p>For <span>HTML documents</span>, and for <span>HTML
More information about the Commit-Watchers
mailing list