Re: [Moderator Action] CSS question

On Thu, 2006-12-07 at 14:45 +0000, John Lawler wrote:
> K – not sure if this is the right way to address my question – is
> there a forum dedicated to W3C? 
> 
>  
> 
> I was just wondering, the spec page does not specify that the <style>
> element is REQUIRED to be in the <head> element, and I have had it
> work within the <body> tag, but would avoid doing so if it goes
> against the actual spec. Could you please clarify this for me? I would
> very much appreciate it, thank you.

The style element must b inside the head element per the DTD [1],
in particular:
 <!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- -->

 - Ian


[1] http://www.w3.org/TR/html401/sgml/dtd.html.

>  
> 
> The HTML 4 specification defines how style sheet rules may be
> specified for HTML documents: either within the HTML document, or via
> an external style sheet. To put the style sheet into the document, use
> the STYLE element:
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
> <HTML>
>   <HEAD>
>   <TITLE>Bach's home page</TITLE>
>   <STYLE type="text/css">
>     h1 { color: red }
>   </STYLE>
>   </HEAD>
>   <BODY>
>     <H1>Bach's home page</H1>
>     <P>Johann Sebastian Bach was a prolific composer.
>   </BODY>
> </HTML>
> 
>  
> 
>  
> 
> John Lawler
> 
> Creative Developer
> 
> Travidia Inc.
> 
> Office:  (530) 343-6400
> 
> Fax:     (530) 343-1505
> 
> jlawler@travidia.com
> 
> support@travidia.com
> 
>  
> 
> 
-- 
Ian Jacobs (ij@w3.org)   http://www.w3.org/People/Jacobs
Tel:                     +1 718 260-9447

Received on Thursday, 7 December 2006 15:03:10 UTC