Style

Support Key: [2|3|3.2*|4] [X1|X1.1] [IE3B1|M|N4B2|O3.5]
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson =
Main Index | Element Tree | Element Index | HTML Support History



   Quick Statistics   
End Tag:
   Required
Standards Details:
In all HTML 4.x/XHTML DTDs
XHTML Modules:
Stylesheet
CSS 'display' Type:
NA
CSS Mapping:
NA
Default Rendering:
NA
Official Docs:
HTML 4.x, XHTML 1.1

What is it?
The STYLE element is one of the three methods used [-->Index DOT Css] to include style information in an HTML document. The STYLE element is used in the document HEAD section to indicate style information for the entire document. If a LINKed stylesheet also exists for the current document, the CSS style rules indicated in the STYLE element should have precedence over styles in the LINKed stylesheet, given that each of the selectors for the style rules are equal. For more information on Cascading Style Sheets, please see Index DOT Css.

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 (<!-- -->)

Common Attributes
%Core%
[2|3|3.2|4] [X1|X1.1] [IE5|M|N6|O4]
%Accessibility%
[2|3|3.2|4] [X1|X1.1] [IE|M|N6|O]
%Language%
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O]

Specific Attributes
Disabled
[2|3|3.2|4] [X1|X1.1] [IE4|M|N|O]
Standards Details: NA
Required? No
Description:
This is a stand-alone attribute which indicates the style reference is initially non-functional.
Values: NA (HTML); disabled (XHTML)
Language
[2|3|3.2|4] [X1|X1.1] [IE|M|N4-4.x|O]
Standards Details: NA
Required? No
Description:
This attribute indicates the scripting language used in this element.
Values: Alphanumeric string representing a scripting language.
Media
[2|3|3.2|4] [X1|X1.1] [IE4|M|N4|O3.5]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This attribute is a keyword representing the intended rendering destination for the style sheet definitions. Multiple destinations are given delimited by commas.
Values:
screen [DEFAULT] - style information should be used for rendering to computer screens.
print - style information should be used for rendering to page-centric devices, ie: printed paper or print preview screen modes.
projection - style information should be used for rendering to transparent projected media devices.
braille - style information should be used for rendering to braille devices.
speech - style information should be used for rendering to speech synthesizers.
all - style information should be used for rendering to all devices.
Title
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O]
Standards Details: In all HTML 4.x/XHTML DTDs
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 element.) 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: CDATA.
Type
[2|3|3.2|4] [X1|X1.1] [IE3B1|M|N4B2|O]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? Yes
Description:
This attribute indicates the Internet Media type (MIME) of the STYLE element content. This MIME type applies to style rules applied within the STYLE element area as well as to all inline styles [-->Index DOT Css] in the current document specified by the STYLE attribute used in HTML elements.
Values: CDATA. [The current allowed values are text/css, and text/javascript]
xml:space
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O]
Standards Details: Intrinsic part of XML
Required? No
Description:
This is a basic XML syntax that keeps all whitespace characters intact when they are parsed. Spacing characters can be an important part of some CSS properties, so including this attribute in the standards for this element makes sense.
Values: preserve - maintain all whitespace characters in rendering and data storage (including multiple spaces, tabs, carriage returns and linefeeds.)
Example
<html>
<head>
    <title>Style Sheet Example</title>
<style type="text/css">
<!--
    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...