[whatwg] Empty elements

Tim Altman web at timaltman.com
Fri Feb 17 09:10:35 PST 2006


On Thu, 16 Feb 2006 21:02:16 +0100, Ian Hickson <ian at hixie.ch> wrote:

> On Thu, 16 Feb 2006, Tim Altman wrote:
>>
>> OK.  Assuming the HTML5 document is served with a text/html doctype,  
>> how would
>> the following markup be parsed?
>>
>> <table>
>>   <tr>
>>     <td>
>>       <canvas/>
>>       <p>Foo</p>
>>     </td>
>>   </tr>
>> </table>
>
> You omitted the DOCTYPE, which makes it a "difficult parse error" and  
> thus
> isn't currently defined (i.e. it triggers Quirks mode). Assuming the
> document started with "<!DOCTYPE HTML>", though, and ignoring all
> whitespace (nothing interesting happens with whitespace):

Got it.  Thank you.

[...]

>> I skimmed the parsing section of the current HTML5 draft (mainly
>> 8.2.2.3.7) and noticed that the canvas element is being treated as a
>> "phrasing" element. Is this by mistake?  I would think it would be
>> treated similar to the object element, since they have similar handling
>> of fallback content.
>
> New elements will all be either treated like <div>, <input>, or <span>,
> depending on whether they are structure-like, empty, or something else.
>
> <object> has _complicated_ parsing semantics. We don't want to make any
> new elements have complicated parsing semantics (especially because that
> wouldn't be backwards-compatible).

OK.

-- 
Tim Altman



More information about the whatwg mailing list