chromatic_aberration wrote:
> I "discovered" some time ago, that closing <br> and <img [...]> tags
> (i.e. <br /> and <img [...] />) in an HTML 4.01 Strict document,
> actually *validates* on the W3C markup validator... (while <meta /> does
> not, though).
> AFAIK, this should only be the case for XHTML documents...
> So far, I've not been able to find documentation for this 'feature'.
>
> Anybody knows if this is intentional, or a bug?
It is a quirk of SGML.
In HTML <foo /> is equivalent to <foo>> and thus <foo>>.
You can't have > as character data in the <head> (it will imply the end
of the head element and the start of the body element since the </head>
and
<body> tags are options).
You CAN have <br>> because anywhere that <br> is allowed so is >.
The
same applies to <img>, <input> and sometimes <img>. (And I'm not in the
mood to look to see if I've forgotten any other empty elements).
--
David Dorward <http://blog.dorward.me.uk/>
<http://dorward.me.uk/>
Home is where the ~/.bashrc is


|