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

Error Message Feedback - missing title tag reported as mal-formed XML

From: Mike Gradek <mike@9media.com>
Date: Fri, 29 Sep 2006 01:20:26 -0400
To: <www-validator@w3.org>
Message-ID: <000001c6e386$fa431160$c8531105@mikedesktop>
Validating 

 

When validating the following document, an error is reported about lack of
XML well-formedness

 

*  Error Line 5 column 6: end tag for "head" which is not finished.

</head>

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

<head>

<style type="text/css" media="all">@import "./browserspecific.css";</style>

</head>

<body>

<h1>Css selectors for specific browsers</h1>

<div id="doctype">Current doc type<cite>&lt;!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</cite></div>

<div class="Firefox">You are using <strong>Firefox or Opera</strong></div>

<div class="ie6">You are using <strong>IE6</strong> <pre>Browser-specific
selector prefix: <em>* html</em></pre></div>

<div class="ie7">You are using <strong>IE7</strong> <pre>Browser-specific
selector prefix: <em>*:first-child+html</em></pre><a
href="http://nanobox.chipx86.com/blog/2006/04/easy-css-hacks-for-ie7.php">Co
nsult source</a></div>

</body>

</html>

 

 

Adding a title tag, as below, makes the error go away. 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

<head>

<title>Strict Page</title>

<style type="text/css" media="all">@import "./browserspecific.css";</style>

</head>

<body>

<h1>Css selectors for specific browsers</h1>

<div id="doctype">Current doc type<cite>&lt;!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</cite></div>

<div class="Firefox">You are using <strong>Firefox or Opera</strong></div>

<div class="ie6">You are using <strong>IE6</strong> <pre>Browser-specific
selector prefix: <em>* html</em></pre></div>

<div class="ie7">You are using <strong>IE7</strong> <pre>Browser-specific
selector prefix: <em>*:first-child+html</em></pre><a
href="http://nanobox.chipx86.com/blog/2006/04/easy-css-hacks-for-ie7.php">Co
nsult source</a></div>

</body>

</html>

 

 

I believe the error message should be updated to better represent the issue.

 

Cheers,

Mike

 
Received on Friday, 29 September 2006 05:21:46 GMT

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