The discrepancies in the validation code for HTML and CSS

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 is:

    <a href=""><img
        alt="Valid HTML 4.01 Strict" height="31" width="88"></a>

while the CSS suggestion on is

    <a href="">
        <img style="border:0;width:88px;height:31px"
            alt="Valid CSS!" />

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
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 is very good at setting standard that everybody uses,
so we can unify the code as in

<a href=""> <img src="" alt="Valid HTML 4.01 Strict"
height="31" width="88"> </a> <a href=""> <img
style="border:0;width:88px;height:31px" src="" 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

Received on Sunday, 30 May 2010 12:17:42 UTC