Skip to content

Commit 8f1b75f

Browse files
committed
only allow main in body/div
1 parent 38465fa commit 8f1b75f

File tree

2 files changed

+37
-47
lines changed

2 files changed

+37
-47
lines changed

images/content-venn.svg

Lines changed: 0 additions & 1 deletion
Loading

source

Lines changed: 37 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -10698,7 +10698,6 @@ console.assert(image.height === 200);</pre>
1069810698
<li><code>kbd</code></li>
1069910699
<li><code>label</code></li>
1070010700
<li><code>link</code> (if it is <span>allowed in the body</span>)</li>
10701-
<li><code>main</code></li>
1070210701
<li><code>map</code></li>
1070310702
<li><code>mark</code></li>
1070410703
<li><span>MathML <code>math</code></span></li>
@@ -10741,9 +10740,6 @@ console.assert(image.height === 200);</pre>
1074110740
<li><span data-x="text content">Text</span></li>
1074210741
</ul>
1074310742

10744-
<p><dfn>Flow content excluding main</dfn> is <span>flow content</span>, but with no
10745-
<code>main</code> element descendants.</p>
10746-
1074710743

1074810744
<h6>Sectioning content</h6>
1074910745

@@ -11010,7 +11006,6 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%
1101011006
<li><code>ins</code></li>
1101111007
<li><code>kbd</code></li>
1101211008
<li><code>label</code></li>
11013-
<li><code>main</code></li>
1101411009
<li><code>map</code></li>
1101511010
<li><code>mark</code></li>
1101611011
<li><span>MathML <code>math</code></span></li>
@@ -15145,7 +15140,8 @@ interface <dfn>HTMLStyleElement</dfn> : <span>HTMLElement</span> {
1514515140
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1514615141
<dd>As the second element in an <code>html</code> element.</dd>
1514715142
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
15148-
<dd><span>Flow content</span>.</dd>
15143+
<dd>Zero or one <code>main</code> element optionally intermixed with <span>flow
15144+
content</span>.</dd>
1514915145
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1515015146
<dd><span>Global attributes</span></dd>
1515115147
<dd><code data-x="handler-window-onafterprint">onafterprint</code></dd>
@@ -15250,7 +15246,7 @@ interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {};
1525015246
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1525115247
<dd>Where <span>flow content</span> is expected.</dd>
1525215248
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
15253-
<dd><span>Flow content excluding main</span>.</dd>
15249+
<dd><span>Flow content</span>.</dd>
1525415250
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1525515251
<dd><span>Global attributes</span></dd>
1525615252
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -15393,7 +15389,7 @@ interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {};
1539315389
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1539415390
<dd>Where <span>flow content</span> is expected.</dd>
1539515391
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
15396-
<dd><span>Flow content excluding main</span>.</dd>
15392+
<dd><span>Flow content</span>.</dd>
1539715393
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1539815394
<dd><span>Global attributes</span></dd>
1539915395
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -15555,7 +15551,7 @@ interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {};
1555515551
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1555615552
<dd>Where <span>flow content</span> is expected.</dd>
1555715553
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
15558-
<dd><span>Flow content excluding main</span>.</dd>
15554+
<dd><span>Flow content</span>.</dd>
1555915555
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1556015556
<dd><span>Global attributes</span></dd>
1556115557
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -15732,7 +15728,7 @@ interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {};
1573215728
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1573315729
<dd>Where <span>flow content</span> is expected.</dd>
1573415730
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
15735-
<dd><span>Flow content excluding main</span>.</dd>
15731+
<dd><span>Flow content</span>.</dd>
1573615732
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1573715733
<dd><span>Global attributes</span></dd>
1573815734
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -16121,8 +16117,8 @@ Space is not the only void</pre>
1612116117
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1612216118
<dd>Where <span>flow content</span> is expected.</dd>
1612316119
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
16124-
<dd><span>Flow content excluding main</span>, but with no <code>header</code> or
16125-
<code>footer</code> element descendants.</dd>
16120+
<dd><span>Flow content</span>, but with no <code>header</code> or <code>footer</code> element
16121+
descendants.</dd>
1612616122
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1612716123
<dd><span>Global attributes</span></dd>
1612816124
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -16208,8 +16204,8 @@ Space is not the only void</pre>
1620816204
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1620916205
<dd>Where <span>flow content</span> is expected.</dd>
1621016206
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
16211-
<dd><span>Flow content excluding main</span>, but with no <code>header</code> or
16212-
<code>footer</code> element descendants.</dd>
16207+
<dd><span>Flow content</span>, but with no <code>header</code> or <code>footer</code> element
16208+
descendants.</dd>
1621316209
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1621416210
<dd><span>Global attributes</span></dd>
1621516211
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -16353,9 +16349,9 @@ Space is not the only void</pre>
1635316349
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1635416350
<dd>Where <span>flow content</span> is expected.</dd>
1635516351
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
16356-
<dd><span>Flow content excluding main</span>, but with no <span>heading content</span>
16357-
descendants, no <span>sectioning content</span> descendants, and no <code>header</code>,
16358-
<code>footer</code>, or <code>address</code> element descendants.</dd>
16352+
<dd><span>Flow content</span>, but with no <span>heading content</span> descendants, no
16353+
<span>sectioning content</span> descendants, and no <code>header</code>, <code>footer</code>, or
16354+
<code>address</code> element descendants.</dd>
1635916355
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1636016356
<dd><span>Global attributes</span></dd>
1636116357
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -17963,7 +17959,7 @@ a friend lost to the
1796317959
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1796417960
<dd>Where <span>flow content</span> is expected.</dd>
1796517961
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
17966-
<dd><span>Flow content excluding main</span>.</dd>
17962+
<dd><span>Flow content</span>.</dd>
1796717963
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1796817964
<dd><span>Global attributes</span></dd>
1796917965
<dd><code data-x="attr-blockquote-cite">cite</code></dd>
@@ -18881,9 +18877,8 @@ first matching case):&lt;/p&gt;
1888118877
<dd>Before <code>dd</code> or <code>dt</code> elements inside <code>dl</code> elements.</dd>
1888218878
<dd>Before <code>dd</code> or <code>dt</code> elements inside <code>div</code> elements that are children of a <code>dl</code> element.</dd>
1888318879
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
18884-
<dd><span>Flow content excluding main</span>, but with no <code>header</code>,
18885-
<code>footer</code>, <span>sectioning content</span>, or <span>heading content</span>
18886-
descendants.</dd>
18880+
<dd><span>Flow content</span>, but with no <code>header</code>, <code>footer</code>,
18881+
<span>sectioning content</span>, or <span>heading content</span> descendants.</dd>
1888718882
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1888818883
<dd><span>Global attributes</span></dd>
1888918884
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -18968,11 +18963,9 @@ first matching case):&lt;/p&gt;
1896818963
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1896918964
<dd>Where <span>flow content</span> is expected.</dd>
1897018965
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
18971-
<dd>Either: One <code>figcaption</code> element followed by <span>flow content excluding
18972-
main</span>.</dd>
18973-
<dd>Or: <span>Flow content excluding main</span> followed by one <code>figcaption</code>
18974-
element.</dd>
18975-
<dd>Or: <span>Flow content excluding main</span>.</dd>
18966+
<dd>Either: one <code>figcaption</code> element followed by <span>flow content</span>.</dd>
18967+
<dd>Or: <span>flow content</span> followed by one <code>figcaption</code> element.</dd>
18968+
<dd>Or: <span>flow content</span>.</dd>
1897618969
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1897718970
<dd><span>Global attributes</span></dd>
1897818971
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -19196,9 +19189,9 @@ included with Exhibit B.
1919619189
<dd><span>Flow content</span>.</dd>
1919719190
<dd><span>Palpable content</span>.</dd>
1919819191
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
19199-
<dd>Where <span>flow content</span> is expected.</dd>
19192+
<dd>As a child of a <code>body</code> or <code>div</code> element.</dd>
1920019193
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
19201-
<dd><span>Flow content excluding main</span>.</dd>
19194+
<dd><span>Flow content</span>, but with no <code>main</code> element descendants.</dd>
1920219195
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1920319196
<dd><span>Global attributes</span></dd>
1920419197
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -19296,7 +19289,8 @@ included with Exhibit B.
1929619289
<dd>As a child of a <code>dl</code> element.</dd>
1929719290
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
1929819291
<dd>If the element is a child of a <code>dl</code> element: one or more <code>dt</code> elements followed by one or more <code>dd</code> elements, optionally intermixed with <span>script-supporting elements</span>.</dd>
19299-
<dd>If the element is not a child of a <code>dl</code> element: <span>Flow content</span>.</dd>
19292+
<dd>If the element is not a child of a <code>dl</code> element: zero or one <code>main</code>
19293+
element optionally intermixed with <span>flow content</span>.</dd>
1930019294
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
1930119295
<dd><span>Global attributes</span></dd>
1930219296
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -40553,7 +40547,7 @@ interface <dfn>HTMLTableRowElement</dfn> : <span>HTMLElement</span> {
4055340547
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
4055440548
<dd>As a child of a <code>tr</code> element.</dd>
4055540549
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
40556-
<dd><span>Flow content excluding main</span>.</dd>
40550+
<dd><span>Flow content</span>.</dd>
4055740551
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
4055840552
<dd><span>Global attributes</span></dd>
4055940553
<dd><code data-x="attr-tdth-colspan">colspan</code></dd>
@@ -40647,9 +40641,8 @@ interface <dfn>HTMLTableCellElement</dfn> : <span>HTMLElement</span> {
4064740641
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
4064840642
<dd>As a child of a <code>tr</code> element.</dd>
4064940643
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
40650-
<dd><span>Flow content excluding main</span>, but with no <code>header</code>,
40651-
<code>footer</code>, <span>sectioning content</span>, or <span>heading content</span>
40652-
descendants.</dd>
40644+
<dd><span>Flow content</span>, but with no <code>header</code>, <code>footer</code>,
40645+
<span>sectioning content</span>, or <span>heading content</span> descendants.</dd>
4065340646
<!-- EDITING NOTE: If you remove 'heading content' from the list above, make sure to fix the definition of 'sectioning root' to include <th> elements -->
4065440647
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
4065540648
<dd><span>Global attributes</span></dd>
@@ -42779,8 +42772,7 @@ interface <dfn>HTMLTableCellElement</dfn> : <span>HTMLElement</span> {
4277942772
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
4278042773
<dd>Where <span>flow content</span> is expected.</dd>
4278142774
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
42782-
<dd><span>Flow content excluding main</span>, but with no <code>form</code> element
42783-
descendants.</dd>
42775+
<dd><span>Flow content</span>, but with no <code>form</code> element descendants.</dd>
4278442776
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
4278542777
<dd><span>Global attributes</span></dd>
4278642778
<dd><code data-x="attr-form-accept-charset">accept-charset</code></dd>
@@ -52019,8 +52011,7 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
5201952011
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
5202052012
<dd>Where <span>flow content</span> is expected.</dd>
5202152013
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
52022-
<dd>Optionally a <code>legend</code> element, followed by <span>flow content excluding
52023-
main</span>.</dd>
52014+
<dd>Optionally a <code>legend</code> element, followed by <span>flow content</span>.</dd>
5202452015
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5202552016
<dd><span>Global attributes</span></dd>
5202652017
<dd><code data-x="attr-fieldset-disabled">disabled</code></dd>
@@ -56418,7 +56409,7 @@ fur
5641856409
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
5641956410
<dd>Where <span>flow content</span> is expected.</dd>
5642056411
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
56421-
<dd>One <code>summary</code> element followed by <span>flow content excluding main</span>.</dd>
56412+
<dd>One <code>summary</code> element followed by <span>flow content</span>.</dd>
5642256413
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5642356414
<dd><span>Global attributes</span></dd>
5642456415
<dd><code data-x="attr-details-open">open</code></dd>
@@ -115939,7 +115930,8 @@ interface <dfn>External</dfn> {
115939115930
<td>Document body</td>
115940115931
<td><span data-x="Sectioning root">sectioning root</span></td>
115941115932
<td><code>html</code></td>
115942-
<td><span data-x="Flow content">flow</span></td>
115933+
<td><span data-x="Flow content">flow</span>;
115934+
<code>main</code>*</td>
115943115935
<td><span data-x="global attributes">globals</span>;
115944115936
<code data-x="handler-window-onafterprint">onafterprint</code>;
115945115937
<code data-x="handler-window-onbeforeprint">onbeforeprint</code>;
@@ -116167,7 +116159,8 @@ interface <dfn>External</dfn> {
116167116159
<span data-x="Palpable content">palpable</span></td>
116168116160
<td><span data-x="Flow content">flow</span>;
116169116161
<code>dl</code></td>
116170-
<td><span data-x="Flow content">flow</span></td>
116162+
<td><span data-x="Flow content">flow</span>;
116163+
<code>main</code>*</td>
116171116164
<td><span data-x="global attributes">globals</span></td>
116172116165
<td><code>HTMLDivElement</code></td>
116173116166
</tr>
@@ -116567,10 +116560,10 @@ interface <dfn>External</dfn> {
116567116560

116568116561
<tr>
116569116562
<th><code>main</code></th>
116570-
<td>Container for the dominant contents of another element</td>
116571-
<td><span data-x="Flow content">flow</span>;
116572-
<span data-x="Palpable content">palpable</span></td>
116573-
<td><span data-x="Flow content">flow</span></td>
116563+
<td>Container for the dominant contents of the document</td>
116564+
<td>none</td>
116565+
<td><code>body</code>;
116566+
<code>div</code></td>
116574116567
<td><span data-x="Flow content">flow</span></td>
116575116568
<td><span data-x="global attributes">globals</span></td>
116576116569
<td><code>HTMLElement</code></td>
@@ -117453,7 +117446,6 @@ interface <dfn>External</dfn> {
117453117446
<code>ins</code>;
117454117447
<code>kbd</code>;
117455117448
<code>label</code>;
117456-
<code>main</code>;
117457117449
<code>map</code>;
117458117450
<code>mark</code>;
117459117451
<span>MathML <code>math</code></span>;
@@ -117733,7 +117725,6 @@ interface <dfn>External</dfn> {
117733117725
<code>ins</code>;
117734117726
<code>kbd</code>;
117735117727
<code>label</code>;
117736-
<code>main</code>;
117737117728
<code>map</code>;
117738117729
<code>mark</code>;
117739117730
<span>MathML <code>math</code></span>;

0 commit comments

Comments
 (0)