Re: Dear Editor,

Hello,

"Jeff Spencer" <JeSpence@tceq.state.tx.us> wrote:

> We encountered a question regarding the documentation covering XHTML closing tag requirements.  While not necessarily incorrect technically, the information may lead to a nonstandard style and result in pages rendered incorrectly by older browsers as the example is not HTML 4 compatible.

Section 4 describes differences with HTML 4, so it's not surprising
that examples there may not be compatible with HTML 4.

> The illustration sample found at http://www.w3.org/TR/2002/REC-xhtml1-20020801/#h-4.6 does not include a space before the closing tag.

That's on purpose.  There's no requirement in XML to include a space
before /> in an empty element.  It's perfectly legal to not include
a space or use the syntax like <hr></hr> when you serve your XHTML
document as 'application/xhtml+xml', 'application/xml' or 'text/xml'.

> The referened HTML Compatibility Guideline, however, states that a space is required.

That's only relevant when you want to serve your XHTML 1.0 document
as 'text/html'.

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Friday, 6 May 2005 05:42:44 UTC