- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 20 Jul 2009 18:26:48 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/markup/src
In directory hutz:/tmp/cvs-serv18408/src
Modified Files:
syntax.html
Log Message:
define what a misnested tag is
Index: syntax.html
===================================================================
RCS file: /sources/public/html5/markup/src/syntax.html,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- syntax.html 20 Jul 2009 15:18:32 -0000 1.59
+++ syntax.html 20 Jul 2009 18:26:46 -0000 1.60
@@ -56,10 +56,10 @@
<pre><!DOCTYPE HTML system "about:legacy-compat"></pre>
</div>
<p>The following are examples of some DOCTYPEs that match the
- definition of a
- <code class="defined-elsewhere">doctypedecl</code>
- (<b class="defined-elsewhere">document type declaration</b>)
- given in the XML specification
+ <a
+ href="http://www.w3.org/TR/2006/REC-xml-20060816/#NT-doctypedecl"
+ ><code class="defined-elsewhere">doctypedecl</code></a>
+ production defined in the XML specification
<a href="#refsXML">[XML]</a>.</p>
<div class="example">
<pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -186,28 +186,28 @@
are defined in the XML specification
<a href="#refsXML">[XML]</a>.</p>
<ul>
- <li><dfn id="tags" title="syntax-tags">Tags</dfn> are used to
- delimit the start and end of elements in the markup. Elements
- have a
- <a href="#syntax-start-tags">start tag</a>
- to indicate where they begin. Non-<a
- href="#void-element">void</a> elements have an
- <a href="#syntax-end-tags">end tag</a>
- to
- indicate where they end.</li>
- <li><dfn id="tag-name" title="syntax-tag-name">Tag names</dfn>
- are used within element start tags and end tags to
- give the element’s name. HTML elements all have names that
- only use characters in the range
- <code title="U+0030 DIGIT ZERO–U+0039 DIGIT NINE">0–9</code>,
- <code title="U+0061 LATIN SMALL LETTER A–U+007A LATIN SMALL LETTER Z">a–z</code>,
- <code title="U+0041 LATIN CAPITAL LETTER A–U+005A LATIN CAPITAL LETTER Z">A–Z</code>,
- and the character
- "<code title="U+002D HYPHEN-MINUS">-</code>".
- Tag names may be written with any mix of
- lowercase and uppercase letters that, when converted to
- all-lowercase, matches the element’s tag name; tag names are
- case-insensitive.</li>
+ <li><dfn id="tags" title="syntax-tags">Tags</dfn> are used to
+ delimit the start and end of elements in the markup. Elements
+ have a
+ <a href="#syntax-start-tags">start tag</a>
+ to indicate where they begin. Non-<a
+ href="#void-element">void</a> elements have an
+ <a href="#syntax-end-tags">end tag</a>
+ to
+ indicate where they end.</li>
+ <li><dfn id="tag-name" title="syntax-tag-name">Tag names</dfn>
+ are used within element start tags and end tags to
+ give the element’s name. HTML elements all have names that
+ only use characters in the range
+ <code title="U+0030 DIGIT ZERO–U+0039 DIGIT NINE">0–9</code>,
+ <code title="U+0061 LATIN SMALL LETTER A–U+007A LATIN SMALL LETTER Z">a–z</code>,
+ <code title="U+0041 LATIN CAPITAL LETTER A–U+005A LATIN CAPITAL LETTER Z">A–Z</code>,
+ and the character
+ "<code title="U+002D HYPHEN-MINUS">-</code>".
+ Tag names may be written with any mix of
+ lowercase and uppercase letters that, when converted to
+ all-lowercase, matches the element’s tag name; tag names are
+ case-insensitive.</li>
<li>
<dfn id="syntax-start-tags">Start tags</dfn>
must have the following format:
@@ -242,7 +242,7 @@
"<code title="U+002F SOLIDUS">/</code>"
character before the closing
"<code title="U+003E GREATER-THAN SIGN">></code>"
- character.</li>
+ character.</li>
</ol>
</li>
<li>
@@ -262,31 +262,65 @@
<a href="#space" title="space character">space characters</a>.</li>
<li>An end tag must be closed by a
"<code title="U+003E GREATER-THAN SIGN">></code>"
- character.</li>
+ character.</li>
</ol>
</li>
- <li><a href="#void-element">Void elements</a> only have a
- start tag; end tags must not be specified for void
- elements.</li>
- <li>The start and end tags of certain elements can be <dfn
- id="omitted" title="syntax-tag-omission">omitted</dfn>.
- The subsection for each element in the <a
- href="#elements">HTML elements</a> section of this
- specification provides information about which tags (if any)
- can be omitted for that particular element.</li>
- <li>A non-<a href="#void-element">void</a> element must have
+ <li><a href="#void-element">Void elements</a> only have a
+ start tag; end tags must not be specified for void
+ elements.</li>
+ <li>The start and end tags of certain elements can be <dfn
+ id="omitted" title="syntax-tag-omission">omitted</dfn>.
+ The subsection for each element in the <a
+ href="#elements">HTML elements</a> section of this
+ specification provides information about which tags (if any)
+ can be omitted for that particular element.</li>
+ <li>A non-<a href="#void-element">void</a> element must have
an end tag, unless the subsection for that element in the <a
- href="#elements">HTML elements</a> section of this
- specification indicates that its end tag can be <a
- href="#omitted">omitted</a>.</li>
- <li>The <a href="#contents">contents</a> of an element must be
- placed between just after the start tag (which
- <a href="#omitted" title="syntax-tag-omission" >might be
- implied, in certain cases</a>) and just before the end tag
- (which again,
- <a href="#omitted" title="syntax-tag-omission">might be
- implied in certain cases</a>).</li>
+ href="#elements">HTML elements</a> section of this
+ specification indicates that its end tag can be <a
+ href="#omitted">omitted</a>.</li>
+ <li>The <a href="#contents">contents</a> of an element must be
+ placed between just after its start tag (which
+ <a href="#omitted" title="syntax-tag-omission" >might be
+ implied, in certain cases</a>) and just before its end tag
+ (which <a href="#omitted" title="syntax-tag-omission">might be
+ implied in certain cases</a>).</li>
</ul>
+ <p>If an
+ <a href="#syntax-elements">element</a>
+ has both a
+ <a href="#syntax-start-tags">start tag</a>
+ and an
+ <a href="#syntax-end-tags">end tag</a>,
+ its end tag must be contained within the
+ <a href="#contents">contents</a>
+ of the same element in which its start tag is contained.
+ An
+ <a href="#syntax-end-tags">end tag</a>
+ that is not contained within the same
+ <a href="#contents">contents</a>
+ as its
+ <a href="#syntax-start-tags">start tag</a>
+ is said to be a
+ <dfn
+ id="misnested-tag"
+ title="misnested-tag">misnested tag</dfn>.</p>
+ <div class="example">
+ <p>In the following example, the
+ "<code></i></code>"
+ <a href="#syntax-end-tags">end tag</a>
+ is a
+ <a href="#misnested-tag">misnested tag</a>,
+ because it is not contained
+ within the
+ <a href="#contents">contents</a>
+ of the
+ <span class="element">b</span>
+ element that contains its corresponding
+ "<code><i></code>"
+ start tag.</p>
+ <pre><b>foo <i>bar</b> baz</i></pre>
+ </div>
</section>
<section id="syntax-attributes">
<h2>Attributes</h2>
Received on Monday, 20 July 2009 18:26:59 UTC