HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2734

File a bug

SVNBugCommentTime (UTC)
2734Start filling in the rendering section.2009-02-02 08:17
Index: source
===================================================================
--- source	(revision 2733)
+++ source	(revision 2734)
@@ -25467,7 +25467,7 @@
           zero, then let <var title="">span</var> be that value.</p>
 
           <p>Otherwise, if the <code>colgroup</code> element has no
-          <code title="attr-col-span">span</code> attribute, or if
+          <code title="attr-colgroup-span">span</code> attribute, or if
           trying to parse the attribute's value resulted in an error,
           then let <var title="">span</var> be 1.</p>
 
@@ -60928,24 +60928,291 @@
 
   <h2 id="rendering">Rendering</h2>
 
+  <p><em>This section all its subsections are non-normative.</em></p>
+
+  <h3>Introduction</h3>
+
+  <p>User agents are not required present HTML documents in any
+  particular way. This section merely provides a set of suggestions
+  for rendering HTML documents that, if followed, are likely to lead
+  to a user experience that closely resembles the experience intended
+  by the documents' authors.</p>
+
+  <p>In general, user agents are expected to support CSS, and many of
+  the suggestions in this section are expressed in CSS terms. User
+  agents that use other presentation mechanisms can derive their
+  expected behavior by translating from the CSS rules given in this
+  section.</p>
+
+  <p>The suggestions in this section generally assume a visual output
+  medium with a resolution of 96dpi or greater, but HTML is intended
+  to apply to multiple media (it is a <i>media-independent</i>
+  language). User agents are encouraged to adapt the suggestions in
+  this section to their target media.</p>
+
+
+  <h3>Hidden elements</h3>
+
+  <p>User agents are expected to use the following styles in all
+  media.</p>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+[hidden], area, audio:not([controls]) base, basefont, command,
+datalist, eventsource, head, input[type=hidden], link,
+menu[type=context], meta, noembed, noframes, param, script, source,
+style, title { display: none; }</pre>
+
+  <p>This hides all the elements that do not represent anything
+  visible.</p>
+
+
+
+  <h3>Visual media defaults</h3>
+
+  <h4>Introduction</h4>
+
+  <p>The CSS rules given in these subsections are expected to be used
+  as the defaults for all documents that contain <span>HTML
+  elements</span> when presented in visual media.</p>
+
+  <p>Rules regarding left and right margins are given here as
+  appropriate for elements whose 'direction' property is 'ltr', and
+  are expected to be flipped around on elements whose 'direction'
+  property is 'rtl'.</p>
+
+  <p class="note">These rules are not a complete description of the
+  default rendering rules expected by legacy content at this time.</p>
+
+  <p class="XXX">Please send feedback if you can accurately describe
+  rules required by legacy content.</p>
+
+
+  <h4>Display types</h4>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+
+address, article, aside, blockquote, body, center, dd, dialog, dir,
+div, dl, dt, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hr,
+html, layer, legend, listing, menu, multicol, nav, ol, p, plaintext,
+pre, section, ul, xmp { display: block; }
+
+table { display: table; }
+caption { display: table-caption; }
+colgroup { display: table-column-group; }
+col { display: table-column; }
+thead { display: table-header-group; }
+tbody { display: table-row-group; }
+tfoot { display: table-footer-group; }
+tr { display: table-row; }
+td, th { display: table-cell; }
+
+li { display: list-item; }</pre>
+
+  <!-- del, ins, and map are inline. -->
+
+  <p>For the purposes of the CSS table model, the <code>col</code>
+  element is to be treated as if it was present as many times as its
+  <code title="attr-col-span">span</code> attribute <span title="rules
+  for parsing non-negative integers">specifies</span>.</p>
+
+  <p>For the purposes of the CSS table model, the
+  <code>colgroup</code> element, if it contains no <code>col</code>
+  element, is to be treated as if it had as many such children as its
+  <code title="attr-colgroup-span">span</code> attribute <span
+  title="rules for parsing non-negative
+  integers">specifies</span>.</p>
+
+  <p>For the purposes of the CSS table model, the <code
+  title="attr-tdth-colspan">colspan</code> and <code
+  title="attr-tdth-rowspan">rowspan</code> attributes on
+  <code>td</code> and <code>th</code> elements are expected to provide
+  the <i>special knowledge</i> regarding cells spanning rows and
+  columns.</p>
+
+
+  <h4>Margins and padding</h4>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+
+body { padding: 8px; }<!-- XXX or margin? -->
+
+blockquote, dir, dl, listing, menu, ol, p, plaintext, pre, ul, xmp {
+  margin-top: 1em; margin-bottom: 1em;
+}
+dir dir, dir dl, dir menu, dir ol, dir ul,
+dl dir, dl dl, dl menu, dl ol, dl ul,
+menu dir, menu dl, menu menu, menu ol, menu ul,
+ol dir, ol dl, ol menu, ol ol, ol ul,
+ul dir, ul dl, ul menu, ul ol, ul ul {
+  margin-top: 0; margin-bottom: 0;
+}
+
+dl > dd { margin-left: 40px; } /* margin-right, for rtl elements */
+dir, menu, ol, ul { padding-left: 40px; } /* margin-right, for rtl elements */
+blockquote { margin-left: 40px; margin-right: 40px; }
+h1 { margin-left: 0.67em; margin-right; 0.67em; }
+h2 { margin-left: 0.83em; margin-right; 0.83em; }
+h3 { margin-left: 1.00em; margin-right; 1.00em; }
+h4 { margin-left: 1.33em; margin-right; 1.33em; }
+h5 { margin-left: 1.67em; margin-right; 1.67em; }
+h6 { margin-left: 2.33em; margin-right; 2.33em; }
+
+table { border-spacing: 2px; border-collapse: separate; }
+td, th { padding: 1px; }</pre>
+
+  <p>In <span>quirks mode</span>, the following rules are also
+  expected to apply:</p>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+form { margin-bottom: 1em; }
+img[align=left] { margin-right: 3px; }
+img[align=right] { margin-left: 3px; }</pre>
+
+  <p>When a <code>Document</code> is in <span>quirks mode</span>,
+  margins on <span>HTML elements</span> that collapse with the top or
+  bottom of the initial containing block are expected to be collapsed
+  to zero.</p>
+
+
+  <h4>Alignment</h4>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+thead, tbody, tfoot, table > tr { vertical-align: middle; }
+tr, td, th { vertical-align: inherit; }
+table[align=left], img[align=left] { float: left; }
+table[align=right], img[align=right] { float: right; }
+th { text-align: center; }</pre>
+
+  <p>The <code>center</code> and <code>caption</code> elements are
+  expected to center text within themselves, as if they had their
+  'text-align' property set to 'center', and to center blocks and
+  tables within them, as their descendants had their horizontal
+  margins set to 'auto'.</p>
+
+
+  <h4>Fonts and colors</h4>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+
+:link, :visited { text-decoration: underline; }
+:link { color: blue; }
+:visited { color: purple; }
+address { font-style: italic; }
+body { color: black; background: white; }
+h1 { font-size: 2.00em; font-weight: bold; }
+h2 { font-size: 1.05em; font-weight: bold; }
+h3 { font-size: 1.17em; font-weight: bold; }
+h4 { font-size: 1.00em; font-weight: bold; }
+h5 { font-size: 0.83em; font-weight: bold; }
+h6 { font-size: 0.67em; font-weight: bold; }
+table { border-color: gray; }
+thead, tbody, tfoot, tr { border-color: inherit; }
+th { font-weight: bold; }
+listing, plaintext, pre, xmp { font-family: monospace; }</pre>
+
+
+  <h4>Punctuation and decorations</h4>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+
+q:before { content: open-quote; }
+q:after { content: close-quote; }
+
+listing, plaintext, pre, xmp { white-space: pre; }
+
+ol { list-style-type: decimal; }
+
+dir, menu, ul {
+  list-style-type: disc;
+}
+
+dir dl, dir menu, dir ul,
+menu dl, menu menu, menu ul,
+ol dl, ol menu, ol ul,
+ul dl, ul menu, ul ul {
+  list-style-type: circle;
+}
+
+dir dir dl, dir dir menu, dir dir ul, 
+dir menu dl, dir menu menu, dir menu ul, 
+dir ol dl, dir ol menu, dir ol ul, 
+dir ul dl, dir ul menu, dir ul ul, 
+menu dir dl, menu dir menu, menu dir ul, 
+menu menu dl, menu menu menu, menu menu ul, 
+menu ol dl, menu ol menu, menu ol ul, 
+menu ul dl, menu ul menu, menu ul ul, 
+ol dir dl, ol dir menu, ol dir ul, 
+ol menu dl, ol menu menu, ol menu ul, 
+ol ol dl, ol ol menu, ol ol ul, 
+ol ul dl, ol ul menu, ol ul ul, 
+ul dir dl, ul dir menu, ul dir ul, 
+ul menu dl, ul menu menu, ul menu ul, 
+ul ol dl, ul ol menu, ul ol ul, 
+ul ul dl, ul ul menu, ul ul ul {
+  list-style-type: square;
+}
+
+iframe { border: 2px inset; }
+
+[dir=rtl] { direction: rtl; unicode-bidi: embed; }
+[dir=ltr] { direction: lrt; unicode-bidi: embed; }
+bdo[dir] { unicode-bidi: bidi-override; }</pre>
+
+  <p>In addition, rules setting the 'quotes' property appropriately
+  for the locales and languages understood by the user are expected to
+  be present.</p>
+
+
+
+  <h4>Resetting rules for inherited properties</h4>
+
+  <p>The following rules are also expected to be in play, resetting
+  certain properties to block inheritance by default.</p>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+table { text-indent: initial; }</pre>
+
+  <p>In <span>quirks mode</span>, the following rules are also
+  expected to apply:</p>
+
+  <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+table {
+  font-weight: initial;
+  font-style: initial;
+  font-variant: initial;
+  font-size: initial;
+  line-height: initial;
+  white-space: initial;
+  text-align: initial;
+}</pre>
+
+
+  <h3>Form controls and widgets</h3>
+
+  <p class="XXX">...</p>
+
+
+
+  <h3>Self-contained features</h3>
+
+  <h4>The <code>marquee</code> element</h4>
+
+  <p class="XXX">...</p>
+
+
+  <h4>The <code>hr</code> element</h4>
+
+  <p class="XXX">...</p>
+
+
+  <h3>Other</h3>
+
   <!-- XXX
 
-    Rendering
-
-    Default styling
-      (have one paragraph or subsection per element)
-      :link, :visited { }
-      :link { }
-      :visited { }
       section { }
-      p { }
-      img { } - how to handle alt text, img in link (no border)...
       mark { }
       /* ... */
 
-      Form Controls
-        ...
-
     Default UI
       link: click
       mark: skip to next mark element
@@ -60962,8 +61229,6 @@
       for datagrid
       ...
 
-
-
 > * note on rt rendering
 > 
 > Since there are a number of documents with ruby but without rp, when you
@@ -60973,9 +61238,11 @@
 > ::after) even when there are no rp elements. Otherwise, reading Web
 > pages without rp is very annoying.
 
+      img - how to handle alt text, img in link (no border)... Define
+      that either the src="" is shown (as an image) or the alt="" is
+      shown (inline) but should not ever have both at once.
 
 
-
 HIT TESTING TRANSPARENCY
 
 Definition: IE considers a point of an element "transparent" if any
@@ -61049,25 +61316,6 @@
   top border edge.</p> <!-- XXX horiz pos given bidi, and not
   scrolling when not required to? -->
 
-<!-- Elements that have been dropped: ACRONYM B BASEFONT BLINK
-BIG CENTER DIR DIV FONT FRAME FRAMESET I ISINDEX MARQUEE NOEMBED
-NOFRAMES S SPACER STRIKE TT U -->
-
-<!-- XXX bits and pieces that were removed from the semantic parts:
-
-  <p>In CSS-aware user agents, the default presentation of this
-  element should be achieved by including the following rules, or
-  their equivalent, in the UA's user agent style sheet:</p>
-
-  <pre>@namespace xh url(http://www.w3.org/1999/xhtml);
-xh|section { display: block; margin: 1em 0; }</pre>
--->
-
-
-<!-- XXX alt="": Define that either the src="" is shown (as an image)
-or the alt="" is shown (inline) but should not ever have both at
-once. -->
-
 <!--
   <h4>Section headers</h4>
 
@@ -61090,7 +61338,6 @@
 
 -->
 
-
   <p class="XXX"> must define letting the user "<dfn>obtain a
   physical form</dfn> (or a representation of a physical form)" of a
   document (printing) and what this means for the UA, in particular
@@ -61101,7 +61348,6 @@
   are case-insensitive, as well as saying which attribute values must
   be compared case-insensitively.</p>
 
-
   <p class="XXX">Need to define the content attributes of BODY in
   terms of CSS or something.</p>
 
@@ -61126,43 +61372,80 @@
   section. They are documented to enable user agents to support legacy
   content in an interoperable fashion.</p>
 
-  <h3>Obsolete elements</h3>
+<!-- XXX Elements that have been dropped: ACRONYM B BASEFONT BLINK BIG
+CENTER DIR DIV FONT FRAME FRAMESET I ISINDEX MARQUEE NOEMBED NOFRAMES
+S SPACER STRIKE TT U -->
 
-  <h4>The <code>body</code> element</h4>
 
+  <h3>Self-contained features</h3>
+
+  <h4>The <dfn><code>applet</code></dfn> element</h4>
+
+  <p>The <code>applet</code> element is a Java-specific variant of the
+  <code>embed</code> element. In HTML5 the <code>applet</code> element
+  is obsoleted so that all extension frameworks (Java, .NET, Flash,
+  etc) are handled in a consistent manner.</p>
+
+  <p id="sandboxPluginApplet">If the <span>sandboxed plugins browsing
+  context flag</span> is set on the <span>browsing context</span> for
+  which the <code>applet</code> element's document is the <span>active
+  document</span>, then the element must be ignored (it represents
+  nothing).</p>
+
+  <p>Otherwise, <span class="XXX">define how the element works,
+  if supported</span>.</p>
+
   <pre class="idl">[XXX] interface <span>HTMLDocument</span> {
-           attribute DOMString <span title="dom-document-fgColor">fgColor</span>;
-           attribute DOMString <span title="dom-document-bgColor">bgColor</span>;
-           attribute DOMString <span title="dom-document-linkColor">linkColor</span>;
-           attribute DOMString <span title="dom-document-vlinkColor">vlinkColor</span>;
-           attribute DOMString <span title="dom-document-alinkColor">alinkColor</span>;
+  readonly attribute <span>HTMLCollection</span> <span title="dom-document-applets">applets</span>;
 };</pre>
 
-  <p>The <dfn title="dom-document-fgColor"><code>fgColor</code></dfn>
-  attribute on the <code>Document</code> object must
-  <span>reflect</span> the <code title="attr-body-text">text</code>
-  attribute on <span>the body element</span>.</p>
+  <p>The <dfn title="dom-document-applets"><code>applets</code></dfn>
+  attribute must return an <code>HTMLCollection</code> rooted at the
+  <code>Document</code> node, whose filter matches only
+  <code>applet</code> elements.</p>
 
-  <p>The <dfn title="dom-document-bgColor"><code>bgColor</code></dfn>
-  attribute on the <code>Document</code> object must
-  <span>reflect</span> the <code title="attr-body-bgcolor">bgcolor</code>
-  attribute on <span>the body element</span>.</p>
 
-  <p>The <dfn title="dom-document-linkColor"><code>linkColor</code></dfn>
-  attribute on the <code>Document</code> object must
-  <span>reflect</span> the <code title="attr-body-link">link</code>
-  attribute on <span>the body element</span>.</p>
+  <h4>The <dfn><code>marquee</code></dfn> element</h4>
 
-  <p>The <dfn title="dom-document-vLinkColor"><code>vLinkColor</code></dfn>
-  attribute on the <code>Document</code> object must
-  <span>reflect</span> the <code title="attr-body-vlink">vlink</code>
-  attribute on <span>the body element</span>.</p>
+  <p class="XXX">...</p>
 
-  <p>The <dfn title="dom-document-aLinkColor"><code>aLinkColor</code></dfn>
-  attribute on the <code>Document</code> object must
-  <span>reflect</span> the <code title="attr-body-alink">alink</code>
-  attribute on <span>the body element</span>.</p>
 
+  <h3>Other elements and attributes</h3>
+
+  <p>The following elements are obsolete and either have no meaning
+  whatsoever or have no requirements beyond those described elsewhere
+  in this specification:</p>
+
+  <ul>
+
+   <li><dfn><code>center</code></dfn></li>
+
+  </ul>
+
+  <hr>
+
+  <p>The following attributes are obsolete and either have no meaning
+  whatsoever or have no requirements beyond those described elsewhere
+  in this specification:</p>
+
+  <ul>
+   <li><dfn title="attr-a-name"><code>name</code></dfn> on <code>a</code> elements</li>
+   <li><dfn title="attr-body-alink"><code>alink</code></dfn> on <code>body</code> elements</li>
+   <li><dfn title="attr-body-bgcolor"><code>bgcolor</code></dfn> on <code>body</code> elements</li>
+   <li><dfn title="attr-body-link"><code>link</code></dfn> on <code>body</code> elements</li>
+   <li><dfn title="attr-body-text"><code>text</code></dfn> on <code>body</code> elements</li>
+   <li><dfn title="attr-body-vlink"><code>vlink</code></dfn> on <code>body</code> elements</li>
+  </ul>
+
+
+  <h3>Other DOM APIs</h3>
+
+  <p>These APIs expose obsolete content attributes.</p>
+
+  <p class="XXX">The [XXX] below is for some annotation meaning "this
+  is just another part of the named interface, and should be treated
+  as if it had been part of the main interface definition".</p>
+
   <pre class="idl">[XXX] interface <span>HTMLBodyElement</span> {
            attribute DOMString <span title="dom-body-text">text</span>;
            attribute DOMString <span title="dom-body-bgColor">bgColor</span>;
@@ -61202,35 +61485,42 @@
   the element's <code title="attr-body-vlink">vlink</code> content
   attribute.</p>
 
+  <pre class="idl">[XXX] interface <span>HTMLDocument</span> {
+           attribute DOMString <span title="dom-document-fgColor">fgColor</span>;
+           attribute DOMString <span title="dom-document-bgColor">bgColor</span>;
+           attribute DOMString <span title="dom-document-linkColor">linkColor</span>;
+           attribute DOMString <span title="dom-document-vlinkColor">vlinkColor</span>;
+           attribute DOMString <span title="dom-document-alinkColor">alinkColor</span>;
+};</pre>
 
+  <p>The <dfn title="dom-document-fgColor"><code>fgColor</code></dfn>
+  attribute on the <code>Document</code> object must
+  <span>reflect</span> the <code title="attr-body-text">text</code>
+  attribute on <span>the body element</span>.</p>
 
-  <h4>The <dfn><code>applet</code></dfn> element</h4>
+  <p>The <dfn title="dom-document-bgColor"><code>bgColor</code></dfn>
+  attribute on the <code>Document</code> object must
+  <span>reflect</span> the <code title="attr-body-bgcolor">bgcolor</code>
+  attribute on <span>the body element</span>.</p>
 
-  <p>The <code>applet</code> element is a Java-specific variant of the
-  <code>embed</code> element. In HTML5 the <code>applet</code> element
-  is obsoleted so that all extension frameworks (Java, .NET, Flash,
-  etc) are handled in a consistent manner.</p>
+  <p>The <dfn title="dom-document-linkColor"><code>linkColor</code></dfn>
+  attribute on the <code>Document</code> object must
+  <span>reflect</span> the <code title="attr-body-link">link</code>
+  attribute on <span>the body element</span>.</p>
 
-  <p id="sandboxPluginApplet">If the <span>sandboxed plugins browsing
-  context flag</span> is set on the <span>browsing context</span> for
-  which the <code>applet</code> element's document is the <span>active
-  document</span>, then the element must be ignored (it represents
-  nothing).</p>
+  <p>The <dfn title="dom-document-vLinkColor"><code>vLinkColor</code></dfn>
+  attribute on the <code>Document</code> object must
+  <span>reflect</span> the <code title="attr-body-vlink">vlink</code>
+  attribute on <span>the body element</span>.</p>
 
-  <p>Otherwise, <span class="XXX">define how the element works,
-  if supported</span>.</p>
+  <p>The <dfn title="dom-document-aLinkColor"><code>aLinkColor</code></dfn>
+  attribute on the <code>Document</code> object must
+  <span>reflect</span> the <code title="attr-body-alink">alink</code>
+  attribute on <span>the body element</span>.</p>
 
-  <pre class="idl">[XXX] interface <span>HTMLDocument</span> {
-  readonly attribute <span>HTMLCollection</span> <span title="dom-document-applets">applets</span>;
-};</pre>
 
-  <p>The <dfn title="dom-document-applets"><code>applets</code></dfn>
-  attribute must return an <code>HTMLCollection</code> rooted at the
-  <code>Document</code> node, whose filter matches only
-  <code>applet</code> elements.</p>
 
 
-
   <h3>Conformance checkers</h3>
 
   <p>To ease the transition from HTML4 Transitional documents to the

|