W3C home > Mailing lists > Public > www-validator@w3.org > May 2010

Re: The discrepancies in the validation code for HTML and CSS

From: Kenneth Kin Lum <kenneth.kin.lum@gmail.com>
Date: Sun, 30 May 2010 06:28:13 -0700
Message-ID: <AANLkTinnAGCiyBiUrOfKpq1lCe19JTrkWjmaodUzSX_v@mail.gmail.com>
To: www-validator-css@w3.org, www-validator@w3.org, www-style@w3.org
actually, on IE 8 and IE 8's compatibility mode for IE 7, there would be an
extra space in between the two icons, with an underline, that links to the
HTML validation site.  Is this a bug of IE 8, or is IE 8 following the
standard?  (Firefox, Chrome, and Safari all won't do that).  So to make it
work, the code needs to be:

<a href="http://validator.w3.org/check?uri=referer">
<img src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01 Strict" height="31" width="88"></a>

<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
alt="Valid CSS!"></a>

On Sun, May 30, 2010 at 5:17 AM, Kenneth Kin Lum

> The validators of HTML and CSS are fantastic.  I'd like to suggest the code
> of the HTML and CSS validation image and link be more consistent across the
> two platforms.
> The HTML suggestion on http://validator.w3.org is:
> <p>
>     <a href="http://validator.w3.org/check?uri=referer"><img
>         src="http://www.w3.org/Icons/valid-html401"
>         alt="Valid HTML 4.01 Strict" height="31" width="88"></a>
>   </p>
> while the CSS suggestion on http://jigsaw.w3.org/css-validator is
> <p>
>     <a href="http://jigsaw.w3.org/css-validator/check/referer">
>         <img style="border:0;width:88px;height:31px"
>             src="http://jigsaw.w3.org/css-validator/images/vcss"
>             alt="Valid CSS!" />
>     </a>
> </p>
> It looks like the HTML validation link is a little bit paranoid as to being
> afraid that extra space might be added in front of the <img> tag, that's why
> the <img> begin tag is right after the <a> tag.  But
> 1) Most likely, it won't be a white-space: pre  (or <pre>) when showing
> this link.
> 2) Even if it is, the spaces in front of the <a> tag will make a difference
> too, so the user will edit the code to remove those space in that case.
> 3) If the HTML part is afraid of that, how come the CSS part is not afraid
> of the extra space?
> 4) When it is not white-space: pre or <pre>, then any white space before
> and after displayable content is ignored.  Only space between displayable
> elements is actually taken into effect when shown on the display or media.
> Because I think w3.org is very good at setting standard that everybody
> uses, so we can unify the code as in
> <a href="http://validator.w3.org/check?uri=referer"> <img src="
> http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Strict"
> height="31" width="88"> </a> <a href="
> http://jigsaw.w3.org/css-validator/check/referer"> <img
> style="border:0;width:88px;height:31px" src="
> http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> </a>
> When the CSS validator detects that it is HTML 4.01 instead of XHTML 1.0,
> it can also make the <img> tag use HTML instead of XHTML.
> a sample is put on
> http://www.ijwtlyk.com/proj/html/html401andJavascript.html
Received on Sunday, 30 May 2010 13:28:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:17 UTC