Style
 
End Tag: Required
Support Key: 2 | 3 | 3.2 | IE3B1 | M | N4B2
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson [bloo@blooberry.com] =
Main Index | Top Of Tree | Tag Index | Tag History


What is it?
The STYLE tag is one of the three methods used to include style information in an HTML document. The STYLE tag is used in the document HEAD section to indicate style information for the entire document. If a LINK tag exists (used to specify a style sheet external to the document) in conjunction with the STYLE element, the rules indicated in the STYLE section should be used instead of the LINK styles (i.e. it is independent of the style sheet cascading mechanism.)
For more information on Style Sheets, please see the Style Sheet Guide.

NOTE: Because this HEAD element requires a start and end tag, older browsers may end up displaying the style content it contains. In order to prevent this, it is STRONGLY recommended to embed this style information within the HTML Comment structure (<!-- -->)
Attributes
Title
2 | 3 | 3.2 | IE3B1 | M | N4B2
Required? No
Description:
This attribute is for use when other style sheet methods are specified. It allows the browser to build a menu of alternative style sheets (such as if one or more external Style Sheets are specified through use of the LINK tag.) It may also be used to identify the Style Sheet in order to allow the user to have control over turning it on or off.
Values: An alphanumeric string
Type
2 | 3 | 3.2 | IE3B1 | M | N4B2
Required? No
Description:
This attribute indicates the Internet Media type (MIME) of the STYLE tag content. This MIME type applies to style rules applied within the STYLE tag area as well as to all inline styles in the current document specified by the STYLE attribute used in HTML tags.
Values: The current allowed value is text/css.
Example
<html>
<head>
    <title>Style Sheet Example</title>
<style>
<!--
    h1 {
    font-weight: bold;
    font-size: 12pt;
    line-height: 14pt;
    font-family: helvetica;
    font-style: normal
    }
-->
</style>
</head>
<body>
    This is plain text
    <h1>This is Heading 1 affected by a style sheet</h1>
    This is plain text
</body>
</html>
Parent Model
<head>
Content Model
%Text% | <!-- -->
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...