chromatic_aberration mumbled the following on 01/02/2006 13:43:
> 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?
The browsers, and in this case, the validation script see the "/" as
just another attribute. However, it doesn't recognise it, so it ignores
it. Technically XHTML shouldn't have a space before the / e.g. <br/> but
then the parser doesn't know an element called "br/". Put the space in,
and all it sees is the element "br" with an attribute "/".
It doesn't hurt to have these close these empty elements, but it would
be best to either use an XHTML DTD, or stick with /plain/ HTML.
--
Gazza
Mobile Number Network Checker - http://mnnc.net/
Leovanna Leonbergers - http://leovanna.co.uk/
Scarlet Town - http://scarlettown.co.uk/


|