W3C home > Mailing lists > Public > www-validator@w3.org > March 2006

Incorrect Validation of the External Stylesheet link

From: Chris Eals <chriseals@gmail.com>
Date: Fri, 17 Mar 2006 10:55:43 +0000
Message-ID: <893c03ab0603170255h5fa1280fqe1007d75e8d9d1eb@mail.gmail.com>
To: "www-validator@w3.org" <www-validator@w3.org>

I think I have found an error in the HTML 4.01 Transitional Validator.

When I put my code through the calidator it kept giving me an error about
the head tag (see below)

Error *Line 8 column 6*: end tag for element "HEAD" which is not open.


 I checked through the code but couldn't find anything wrong with the head
tags so i started taking parts of the code out, all the javascript functions
in the head and body sections but the error persisted.  It only validated
properly when I took the link to the stylesheet out, so I went to the
w3schools website to check if I had done the link wrong but it was in the
same format.

The code that it was rejecting is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<title>Hadrians Wall</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="WallStyles.css" />

But if I took the ending slash off the link tag so it was:

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

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

I tried it in xhtml and it required the closing slash.

Hope this helps in some way>

Chris Eals
Received on Saturday, 18 March 2006 13:37:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:30:51 UTC