W3C home > Mailing lists > Public > www-html@w3.org > December 2005

Re: HTML Improvement/Suggestion

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Mon, 12 Dec 2005 12:15:25 +0100
Message-ID: <20051212121525.r7uecaru1nooocko@webmail.annevankesteren.nl>
To: Sebastian Redl <sebastian.redl@getdesigned.at>
Cc: www-html@w3.org

Quoting Sebastian Redl <sebastian.redl@getdesigned.at>:
>> DTDs are ingored, but did you ever play with XML (or XHTML) as 
>> opposed to HTML?
>> You can do all funny things you want to do. Like nesting <div> 
>> inside <span> et
>> cetera.
> Define "can".

The dictionary meaning. Not sure what it is unclear here...

> In XML, elements are arbitrary and have no meaning. You can nest 
> whatever you want in everything else, and the document will be 
> well-formed.

Being well-formed or not depends on more things, but that was actually 
my point.
As long as the doucment is well-formed it does not really matter what you do.

> But specific XML languages, such as XHTML, go beyond that and define 
> the document structure. A non-validating parser will accept a div 
> inside a span for XHTML, but it is invalid according to the standard 
> and all schemas, and a validating parser will reject it.

That's why I said DTDs are ignored. You shouldn't really use them in the first

> The same in HTML: it's invalid, but browsers will accept it because 
> they're very forgiving. However, the results of this, especially the 
> display behaviour of showing a block element inside an inline 
> element, are undefined. You can't rely on a behaviour.

If browsers weren't forgiving the extensibility of the language would 
stop more
or less. Also, an XML/XHTML/HTML document can go in and out of being valid
dynamically, so what you're saying would have never worked in practice anyway.
The SVG WG, for one, acknowledged this.

Anne van Kesteren
Received on Monday, 12 December 2005 11:16:06 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:12 UTC