Re: Non-standard CSS-Validator Image Link

Jens Schwartz wrote:

> The validator offered me the following code to place on the page:

Just ignore the suggestion. "Validation icons" are worse than useless, 
as explained at
http://www.cs.tut.fi/~jkorpela/html/validation.html#icon

>   <a href="http://jigsaw.w3.org/css-validator/">
>         <img style="border:0;width:88px;height:31px"
>             src="http://jigsaw.w3.org/css-validator/images/vcss"
>             alt="CSS ist valide!" />
>     </a>
>
> This code is not valid to the W3C HTML specification. You might
> recognize the end of the IMG tag as non-valid: ..." />

It is valid (though not recommendable, but that's a different issue) in 
all versions of HTML, not just XHTML. You can see this if you use a 
markup validator, such as http://validator.w3.org

By formal HTML rules prior to XHTML, the "/" terminates the img tag, 
leaving the ">" homeless, but it's then a data character in a context 
where text is allowed. Practically speaking no browser plays by those 
formal HTML rules in this respect, but validity is defined in terms of 
those rules.

This confusion in explained in boring detail at
http://www.cs.tut.fi/~jkorpela/html/empty.html

And you would have avoided this confusion in this context if you had 
ignored the suggestion to slap some "validity icon" on your page. :-)

Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/ 

Received on Friday, 14 March 2008 09:06:46 UTC