Search DaTutorials:  
HOME
DHTML Reference
Introduction
Reference

STYLE Element | style Object


Specifies a style sheet for the page.

Members Table

AttributePropertyDescription
disabled Sets or retrieves whether a style sheet is applied to the object.
IDid Retrieves the string identifying the object.
innerHTML Retrieves the HTML between the start and end tags of the object.
CollectionDescription
behaviorUrns Returns a collection of Uniform Resource Name (URN) strings identifying the behaviors attached to the element.
EventDescription
onerror Fires when an error occurs during object loading.
onreadystatechange Fires when the state of the object has changed.
MethodDescription
addBehavior Attaches a behavior to the element.
dragDrop Initiates a drag event.
removeBehavior Detaches a behavior from the element.
removeNode Removes the object from the document hierarchy.
Style attributeStyle propertyDescription
MEDIAmedia Sets or retrieves the media type.
TYPEtype Retrieves the Cascading Style Sheets (CSS) language in which the style sheet is written.

Remarks

The STYLE element should appear in the HEAD section of an HTML document. Microsoft® Internet Explorer 4.0 and later permit multiple style blocks.

This element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

This element is not rendered.

This element requires a closing tag.

Example

This example encloses style declarations in the STYLE element and changes one of those settings using the style object.

<HEAD>
<STYLE>
   BODY {  background-color: white; color: black;  }
   H1 {  font: 8pt Arial bold;  }
   P  {  font: 10pt Arial; text-indent: 0.5in;  }
   A  {  text-decoration: none; color: blue;  }
</STYLE>
<SCRIPT>
    oParagraph.style.fontSize = 14;
</SCRIPT>
</HEAD>
<BODY>
<P>Sample Paragraph Text</P>
</BODY>

Standards Information

object is defined in HTML 3.2 Non-Microsoft link.


     CreditCards | Car Insurance | Problem Mortgage | Mobile Phone | Internet Advertising
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp