# style

Creates a style sheet within the document.

## Platform Support

IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | ---
2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+

## Example

This example shows a small stylesheet in the head of an HTML document.

    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<title>Aptana Home Page</title>
    	<style type="text/css" >
    		body  {background: yellow;}
    				p    {color: red; font: 14pt Arial;}
    	</style>
    </head>

## Remarks

You can also link to external CSS style sheets to format your documents.

## Attribute Detail

Attribute | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
dir Direction of the element text. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
disabled Specifies whether or not the element is disabled. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
id [element-id] Unique identifier for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
lang [language-code]. Example values: "en" (English), "fr" (French), "es" (Spanish), etc. Language code for the content of the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
media Media type associated with the element. | 4.0+ | 1.1+ | 1.0+ | 4.0+ | 1.0+
title [text-description] Short text description for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
type (style) Specifies the MIME type for the stylesheet language. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
xml:space If set, specifies whether to override the default whitespace handling within the element. | 5.0+ | no | no | no | no

## Event Detail

Event | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
onerror Fires when an error occurs with the object associated with the element. | 4.0+ | no | no | no | 1.0+
onreadystatechange Fires when the ready state of the element changes. | 4.0+ | no | no | no | no

## Availability

W3C HTML 4.01

text_html aptana_docs