Previous Message
Next Message

Style Element within Body Tag

Sent by S.D.Price on 9 September 2003 17:05


Hi Adam thanks for the advice.

I was trying to indicate which page the user was on by targeting the
relevant link on each page using css in an include. I should be OK to put
the css code in an external css file. 

I scanned through a couple of CSS books but I couldn't see anything against
putting the <style> attribute in the body - should have looked at the w3c
specs more closely!

Steven






-----Original Message-----
From: Adam Kuehn [EMAIL-REMOVED]] 
Sent: 09 September 2003 16:21
To: S.D.Price; [EMAIL-REMOVED]
Subject: Re: [css-d] Style Element within Body Tag


S.D.Price wrote:
>My CSS is in a <style> tag within the <body> of the document

You can stop right there.  The <style> tag is not allowed in the 
document body, but only in the head.  Although the DTD is hard to 
read, you can start here:

<http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_head.misc>

You can see that the list of elements for the body later in this same 
document does not include a style element.

Just out of curiosity, why would you want to include a style element 
inline in this manner, when you can put it as an attribute in the 
relevant tag:

<a id="reindex" href="reflect_index.asp" style="color: black; 
background-color: transparent; font-weight: bold; text-decoration: 
none;">Reflect on your language history</a>

HTH,
-- 

-Adam Kuehn

"This sentence includes exactly threee erors."
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: