[thelist] Why do we say what we say?

Matt Warden mwarden at gmail.com
Thu Oct 25 13:46:48 CDT 2007


On 10/25/07, Stephen Rider <evolt_org at striderweb.com> wrote:
> Regarding spaces in self-closing elements such as <br />, my
> understanding is this:
>
> Officially, HTML rendering is supposed to ignore attributes it
> doesn't understand.  br is a legitimate tag, but br/ is not.  Thus,
> <br/> is illegitimate HTML tag, while <br /> is a legitimate HTML tag
> with an unknown "/" attribute.  IN THEORY, an html renderer should no
> more understand <br/> than it understands <blearg>.

This is common sense explanation because for the most part browsers
behave as this is what's going on, but technically (as in according to
spec) it's not quite right. Actually <br/> in HTML is the equivalent
of <br>>, where the second > is treated as character data. I can't
point to a single browser that actually follows the spec on this
point, though.

-- 
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the thelist mailing list