This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11529 - inferred start tags
Summary: inferred start tags
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML/XHTML Compatibility Authoring Guide (ed: Eliot Graff) (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Eliot Graff
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-10 16:11 UTC by David Carlisle
Modified: 2011-08-04 05:07 UTC (History)
4 users (show)

See Also:


Attachments

Description David Carlisle 2010-12-10 16:11:46 UTC
The document has special rules for tbody and colgroup, but similar rules need to be stated for every element for which the html parser allows an inferred start tag.

I haven't checked html5 for the full list of these, but two particularly common examples are <head> and <body>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<title>zzz</title>
<p>zzz</p>
</html>


is a valid html5 document that is well formed as XML, but the HTML parser produces

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>zzz</title></head>
<body><p>zzz</p>
</body></html>


with head and title being added automatically
Comment 1 David Carlisle 2010-12-10 18:28:19 UTC
(In reply to comment #0)

> I haven't checked html5 for the full list of these, but two particularly common
> examples are <head> and <body>

I think that <html> is the only other one if my reading of html5 is correct.
Comment 2 Eliot Graff 2010-12-29 19:44:05 UTC
Section 6.1 now begins:

Every polyglot markup document contains an <html>, <head>, <title>, and <body> element. The <html> element is the root element. The <head> and <body> elements are children of the <html> element. The <title> element is a child of the <head> element. Therefore, the following source code would be the most basic polyglot markup document. 

Example

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title></title>
  </head>
  <body>
  </body>
</html>

Thanks for the feedback.

Eliot
Comment 3 Michael[tm] Smith 2011-08-04 05:07:18 UTC
mass-move component to LC1
Comment 4 Michael[tm] Smith 2011-08-04 05:07:39 UTC
mass-move component to LC1