On 29 Okt., 18:28, ricardobeat <[EMAIL PROTECTED]> wrote: > 2. <div /> > > You can't self close a DIV, even if it's empty. The XHTML specs allow > it, but browser currently can't handle it: > (found athttp://www.w3.org/TR/xhtml1/#C_3) > Given an empty instance of an element whose content model is not EMPTY > (for example, an empty title or paragraph) do not use the minimized > form (e.g. use <p> </p> and not <p />).
To clarify: this is an excerpt of the HTML Compatibility Guidelines, which apply if you serve XHTML as text/html, resulting in browsers using its tag soup parser. If you'd send XHTML as true XML (application/xhtml+xml) an XML parser is going to be used and a <div/> would be perfectly understood by such an XML capable browser. IE up to version 8 though is not capable which is why a lot of people (me included) consider XHTML as a dead end today and recommend to use HTML 4 in the first place (which is what XHTML as text/html is anyway from the browser perspective). --Klaus