Posted by Spartanicus on 05/04/06 08:58
Mark Parnell <webmaster@clarkecomputers.com.au> wrote:
>> Really? But they're empty!
>
>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.
>> Is there an </img> tag too?
>
>Absolutely.
A limitation of XML is that a validator won't detect it, but there is no
such tag in XHTML.
>> http://www.w3.org/TR/xhtml1/#guidelines
>> Just looked it up. You can do it because its part of XML but W3C seems
>> to be saying not to use it if at all possible.
>
>Because older browsers (including IE) don't support it and will barf on
>it.
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.
--
Spartanicus
Navigation:
[Reply to this message]
|