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

[Bug 14733] New: self-closing tag in <link rel="..." /> causes also error "end tag for head which is not close" in html 4.0

From: <bugzilla@jessica.w3.org>
Date: Tue, 08 Nov 2011 20:02:29 +0000
To: www-validator-cvs@w3.org
Message-ID: <bug-14733-169@http.www.w3.org/Bugs/Public/>

           Summary: self-closing tag in <link rel="..."  /> causes also
                    error "end tag for head which is not close" in html
           Product: Validator
           Version: HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Parser
        AssignedTo: dave.null@w3.org
        ReportedBy: matteosistisette@gmail.com
         QAContact: www-validator-cvs@w3.org

Consider this code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>bla bla </title>
  <link rel="stylesheet" type="text/css" href="includes/style.css" />
  <script type="text/javascript" src="includes/jquery162.js"></script>
  <script type="text/javascript" src="includes/xxx.js"></script>

    <script src="http://maps.google.com/maps?file=api"
    <script src="includes/general.js" type="text/javascript"></script>
  <script src="includes/qtobject.js" type="text/javascript"></script>


This causes the following validation errors (the first is a warning):

Line 6, Column 68: NET-enabling start-tag requires SHORTTAG YES
  <link rel="stylesheet" type="text/css" href="includes/style.css" />

 Line 13, Column 7: end tag for element "HEAD" which is not open

 Line 15, Column 6: document type does not allow element "BODY" here

The first warning is OK, but the other two errors don't make any sense.
Removing the "/" in the link tag makes the errors disappear.

The use of a self closing tag ended in />  shouldn't cause these errors.
Otherwise, the first warning should be an error instead of a warning.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 8 November 2011 20:02:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:52 UTC