Gazza wrote:
> 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 "/".
Sure, but the validator still validates an HTML 4.01 document, even when
the <br/> doesn't have a space...
> 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.
You can't always do that. Some PHP functions insert <br/> and <img/>
regardless of the DTD in use.
I was told (but I don't know!) that W3C deliberately patched their
validator to 'comply' with PHP... A few years ago, it would not validate
a <br/> in HTML.
That said, I usually stick to HTML 4.01 because of the MIME type issue
in XHTML... but that's an other topic.
--
cheers
/chromatic_aberration


|