You are here: Re: W3C complience checker and conformance « HTML « IT news, forums, messages
Re: W3C complience checker and conformance

Posted by Mark Parnell on 05/04/06 09:11

Deciding to do something for the good of humanity, Spartanicus
<invalid@invalid.invalid> declared in alt.html:
> Mark Parnell <webmaster@clarkecomputers.com.au> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация