[whatwg] [html5] tags, elements and generated DOM

Anne van Kesteren fora at annevankesteren.nl
Tue Apr 5 01:36:55 PDT 2005


I was wondering if HTML5 (WA1, at the moment) is going to define which 
tags are optional and which elements are implied. (This is of course 
only for text/html documents.)

For example, what is the resulting DOM of this document:

  <title>Foo</title>
  <script type="text/javascript" src="bar"></script>

... and this:

  <script type="text/javascript" src="bar"></script>
  <title>Foo</title>

..? Are both part of the implied HEAD element or is the SCRIPT element 
in the first example perhaps part of the BODY element? I believe both 
are possible.

Is there a BODY element in this document (or, is there always a body 
element?):

  <style type="text/css">
   body{ background:lime }
  </style>

... or this:

  <title>Bar</title>

Is HTML5 going to list which start- and endtags are optional and how the 
resulting DOM tree should look like in situations were there are 
multiple options?


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>




More information about the whatwg mailing list