Re: Incorrect Validation of the External Stylesheet link

On Fri, 2006-03-17 at 10:55 +0000, Chris Eals wrote:
> Error Line 8 column 6: end tag for element "HEAD" which is not open..

> <link rel="stylesheet" type="text/css" href="WallStyles.css " />
> </head>

In HTML <foo /> is equivalent to <foo>&gt; (Although most browsers don't
respect this)[1].
Character data (i.e. text to be displayed) is not allowed in the <head>
section.
The end tag for the head element is optional.
The start tag for the body element is optional.
Thus putting character data in the head section implies the end of the
head section and the start of the body section.
This your code means the same as:

<link rel="stylesheet" type="text/css" href="WallStyles.css ">
</head>
<body>
&gt;
</head>

> Then it worked but this is incorrect according to the new rules of the
> code.

XHTML might be newer than HTML, but it doesn't change HTML. The rules
for HTML are still the same.

[1] http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.7
-- 
David Dorward                           <http://dorward.me.uk/>
"Anybody remotely interesting is mad, in some way or another."
                             -- The Greatest Show in the Galaxy

Received on Saturday, 18 March 2006 15:21:18 UTC