Re: Can Browsers Attempt to Render Broken XHTML?

> <select name=color>
>  <option>blue
>  <option>red
> </select>
> 
> works fine in most browsers, in a document declared as HTML. 
> If the document is declared as XHTML, you should use:

It should work fine in ALL conformant HTML parsers, as it is
perfectly valid and unambiguous HTML; it has the same parse tree
as the the normalised example below.  It is not an example of sloppy
HTML.  Sloppy HTML would be: <b><p>Heading</p></b> (same as XHTML:
content model violation, and use of wrong markup for semantics);
<b><i>bold-italic</b></i> (tag soup - not properly nested); or
<html><body>, as seen in much HTML email (content model violation -
missing mandatory element; the missing element is <title>; the head
element is present but the tags have been omitted, as can be the
<html> and </html> tags).  (All my sloppy examples are commonly found
in the wild.)

> 
> <select name="color">
>  <option>blue</option>
>  <option>red</option>
> </select>

Received on Thursday, 26 June 2003 17:55:33 UTC