Re: W3C complience checker and conformance
- From: Mark Parnell <webmaster@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 4 May 2006 16:11:55 +1000
Deciding to do something for the good of humanity, Spartanicus
<invalid@xxxxxxxxxxxxxxx> declared in alt.html:
Mark Parnell <webmaster@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Not in XHTML. XML has no concept of empty elements.
XHTML is merely a reformulation of HTML in XML, what is defined as an
empty element in HTML remains an empty element in XHTML.
Ick, did I really say that? What I meant was that XHTML requires all
elements to be closed, even if they are empty.
Using a closing tag for empty elements with no content turns an element
in to a non empty element with null content. Like validators XHTML
renders won't choke on that, but it's incorrect XHTML.
Either is valid according to the XML and XHTML specs. It's not
*recommended* to use a closing tag, but it's still valid.
"The representation of an empty element is either a start-tag
immediately followed by an end-tag, or an empty-element tag."
http://www.w3.org/TR/2004/REC-xml11-20040204/#sec-starttags
"Empty elements must either have an end tag or the start tag must end
with />"
http://www.w3.org/TR/xhtml1/#h-4.6
Incidentally, the XML spec (see link above) defines elements without any
content "empty", regardless of whether they are defined as EMPTY in the
DTD.
--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html
.
- Follow-Ups:
- Re: W3C complience checker and conformance
- From: Spartanicus
- Re: W3C complience checker and conformance
- From: ironcorona
- Re: W3C complience checker and conformance
- References:
- W3C complience checker and conformance
- From: EN
- Re: W3C complience checker and conformance
- From: David Dorward
- Re: W3C complience checker and conformance
- From: ironcorona
- Re: W3C complience checker and conformance
- From: Mark Parnell
- Re: W3C complience checker and conformance
- From: ironcorona
- Re: W3C complience checker and conformance
- From: Mark Parnell
- Re: W3C complience checker and conformance
- From: Spartanicus
- W3C complience checker and conformance
- Prev by Date: Re: W3C complience checker and conformance
- Next by Date: Re: W3C complience checker and conformance
- Previous by thread: Re: W3C complience checker and conformance
- Next by thread: Re: W3C complience checker and conformance
- Index(es):
Relevant Pages
|