NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 281 - Make <a> elements not define paragraphs, allowing them to straddle paragraphs.
Make <a> elements not define paragraphs, allowing them to straddle paragraphs.
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: HTML5 schema
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-11 14:59 CEST by Henri Sivonen
Modified: 2008-08-15 13:45 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2008-08-11 14:59:48 CEST
Index: source
===================================================================
--- source	(revision 1964)
+++ source	(revision 1965)
@@ -6375,22 +6375,26 @@
   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>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 by <code>p</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
@@ -6427,6 +6431,40 @@
 
   </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>&lt;aside>
+ Welcome!
+ &lt;a href="about.html">
+  This is home of...
+  &lt;h1>The Falcons!&lt;/h1>
+  The Lockheed Martin multirole jet fighter aircraft!
+ &lt;/a>
+ This page discusses the F-16 Fighting Falcon's innermost secrets.
+&lt;/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>&lt;aside>
+ &lt;p>Welcome! &lt;a href="about.html">This is home of...&lt;/a>&lt;/p>
+ &lt;h1>&lt;a href="about.html">The Falcons!&lt;/a>&lt;/h1>
+ &lt;p>&lt;a href="about.html">The Lockheed Martin multirole jet
+ fighter aircraft!&lt;/a> This page discusses the F-16 Fighting
+ Falcon's innermost secrets.&lt;/p>
+&lt;/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>