Re: [CSS21] Make XHTML <body> magic just like HTML <body>

On Mon, 16 Apr 2007 21:39:46 +0200, David Dorward <david@dorward.me.uk>  
wrote:

>
> fantasai wrote:
>
>>> Why should XHTML be different from other forms of XML when they could  
>>> be
>>> the same?
>
>> I think what Simon is arguing is that the element <body> in the XHTML1
>> namespace should be special cased
>
> Yes, but why should they?
>
> Special casing the body in HTML is a legacy feature and inconsistent
> with everything else. Since XHTML is served with a different content
> type, its the ideal time to eliminate the inconsistency.

I don't particularly like it either, but we're stuck with it for HTML.  
Having differences between HTML and XHTML is confusing for authors.

>> whether it is parsed into the DOM from HTML or XHTML.
>
> HTML elements are in the XHTML namespace??

As of the HTML5 parsing spec proposal, yes. In legacy implementations, no.

    http://whatwg.org/html5/section-parsing.html#parsing

However, even today, Firefox, Opera and Safari all treat HTML elements as  
being in the XHTML namespace with regards to selectors in CSS, despite the  
elements being in the null namespace in the DOM.

-- 
Simon Pieters

Received on Monday, 16 April 2007 21:24:19 UTC