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

Re: Validation problem with body in style sheet

From: Liam Quinn <liam@htmlhelp.com>
Date: Mon, 25 Mar 2002 00:42:51 -0500 (EST)
To: Jeff Marcus <jefflmar@attbi.com>
cc: <www-validator@w3.org>
Message-ID: <Pine.LNX.4.33L2.0203250040150.16392-100000@localhost.localdomain>
On Mon, 25 Mar 2002, Liam Quinn wrote:

> On Sat, 23 Mar 2002, Jeff Marcus wrote:
>
> > I have a style sheet that uses a construct like body.xxx {}.  I link in
> > the stylesheet in the <head></head> section of my html.  The validator
> > seems to think that the "body" it sees in the stylesheet is a body tag
> > in my html document.  It consequently shows a parse tree with a <body>
> > tag starting at whatever point I link the stylesheet.
>
> It's hard to help without seeing the HTML document in question.  Perhaps
> you're using an embedded style sheet but you forgot the <style> tag?

Here's a better guess:  You're using XML syntax in an HTML document.  In
HTML, you should use

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

instead of

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

The latter is for XHTML and is not compatible with HTML.

-- 
Liam Quinn
Received on Monday, 25 March 2002 00:42:23 GMT

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