Re: bgcolor="transparent" - valid or invalid? confused...

Ian Stuart wrote:

> [bgcolor="transparent"]
 
> The validator picks up on a number of errors, all of which I
> can understand, but passes this without comment
 
> The W3 specs define bgcolor as taking an RGB colour code, or
> one of the named colour aliases, and "transparent" is not one
> of them.
 
> Which is correct?

Both, in a way.  The validator uses the DTD as its source for
validation, and <!ENTITY % Color "CDATA"> allows any character
data.  Some details are also noted in the DTD, but only as a
comment for human readers.  The validator is only a program,
it cannot interpret prose in a comment.

Of course "transparent" isn't okay, but the validator cannot
know this based on an <!ENTITY % Color "CDATA">

                       Bye, Frank

Received on Thursday, 23 June 2005 21:19:02 UTC