W3C home > Mailing lists > Public > www-validator@w3.org > November 2002

Re: <link /> confuses the validator

From: (wrong string) äper <christoph.paeper@tu-clausthal.de>
Date: Sun, 24 Nov 2002 23:51:52 +0100
Message-ID: <02ca01c2940c$15d8e6d0$3ef4ae8b@heim4.tuclausthal.de>
To: "Morten Nielsen" <mn@iter.dk>, <www-validator@w3.org>

Morten Nielsen <mn@iter.dk>:
>
> How come this validates against HTML4.01 Transitional:
>         <link rel="stylesheet" type="text/css" href="css/iter.css">
>
> But this doesn't:
>         <link rel="stylesheet" type="text/css" href="css/iter.css" />

Due to Shorttag features of SGML enabled in HTML (but not XHTML), the slash
"/" already closes the link element, thus the ">" becomes textual content
which isn't allowed inside the head element, thus "</head><body>" (those
tags are optional) is silently inserted before ">", thus head-only elements
like meta and style as well as "</head>" and "<body>", which may apear only
once, become false.
Isn't this a FAQ?

Christoph Päper
Received on Sunday, 24 November 2002 17:51:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:04 GMT