The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.


< html‎ | elements
Jump to: navigation, search


This article is In Progress.


Defines style information for an HTML document. Inside the style element you specify how HTML elements should render in a browser. Each HTML document can contain multiple style tags.

Overview Table

DOM Interface HTMLStyleElement


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

   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;  }
<SCRIPT> = 14;
<P>Sample Paragraph Text</P>



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

The STYLE element should appear in the HEAD section of an HTML document. Multiple style blocks are permitted.

Standards information


The style object has these types of members:

  • [#events Events]
  • [#methods Methods]
  • [#properties Properties]


The style object has these events. {

Related specifications

Specification Status Related Changes
HTML 5.1 W3C Working Draft
HTML 5 W3C Recommendation
HTML 4.01 W3C Recommendation


This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]