Re: <link> tag not validating properly?

From: Tim Bagot (tsb-w3-validator-0004@earth.li)
Date: Sun, Jun 24 2001

  • Next message: Mike Kendall: "Re: Uh oh! I got the following unknown error:"

    Date: Sun, 24 Jun 2001 23:54:07 +0000 (UTC)
    From: Tim Bagot <tsb-w3-validator-0004@earth.li>
    To: <www-validator@w3.org>
    cc: Kenneth Wright <kenandcorey@hotmail.com>
    Message-ID: <Pine.LNX.4.33.0106242343570.1183-100000@windle.hack>
    Subject: Re: <link> tag not validating properly?
    
    At 2001-06-24T15:20-0400, Kenneth Wright wrote:-
    
    > I have a test page at <http://web.kenandcorey.com/t.htm> that does not pass
    > validation for HTML 4.01. It does not like the trailing slash on my link
    > tag.
    >
    > I want my page to be valid in both HTML 4.01 transitional, and XHTML 1.0
    > transitional, but with the slash it fails HTML4, and without the slash it
    > fails XHTML1.
    >
    > Have I encountered a bug in the validator, or am I missing something?
    
    It's not a bug. The / is required by XHTML, but makes the document invalid
    HTML (since the SGML shorthand markup rules mean that the / closes the
    tag, leaving the > as textual content where it is not allowed). Leaving
    out the / makes the document valid HTML, but then XML requires a closing
    tag, which is not allowed in HTML for EMPTY elements. You just can't have
    both at once (even ignoring that you can only have one doctype at a time
    anyway).
    
    Tim Bagot