Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: HTML Improvement/Suggestion

From: Sebastian Redl <sebastian.redl@getdesigned.at>
Date: Mon, 12 Dec 2005 11:01:56 +0100
Message-ID: <439D4A94.3050806@getdesigned.at>
To: www-html@w3.org

Anne van Kesteren wrote:

> 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".

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.
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.
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.

Sebastian Redl
Received on Monday, 12 December 2005 10:01:52 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.