CSS and HTML head elements

I have a question, how should this HTML page be displayed?

<title>Example displaying the STYLE element</title>
<style>
style {background-color: #FF3333; visibility: visible; display:block;}
</style>
<body style="background-color: #33CC33;">
<p>This is the body.</p>



I think it should be displayed as:

style {background-color: #FF3333; visibility: visible; display:block;}
This is the body.



There is nothing I could find in the CSS standards that prohibit the
display of HEAD elements. The HTML 4.01 standard, sect. 7.4.1 states:

The HEAD element contains information about the current document, such as
its title, keywords that may be useful to search engines, and other data
that is not considered document content. **User agents do not generally
render elements that appear in the HEAD as content.** They may, however,
make information in the HEAD available to users through other mechanisms.
 [my emphasis]



Neither Opera 3.60 nor Internet Explorer 5.0 displays the style element.
Should they? Furthermore, if they shouldn't display head elements, what
about XHTML? There is nothing magical in XML about HEAD, STYLE, TITLE or
SCRIPT (META, BASE and LINK are empty elements).


Curiously yours,
Jonny Axelsson
Net asset

Received on Saturday, 29 January 2000 08:50:54 UTC