1. Technology



STYLE description:

The STYLE tag is used to define style information in an HTML document. When you use a STYLE tag, you are adding an embedded style sheet to your document.

Inside the STYLE tag, you include the HTML tags you want to style, and the style properties that define the styles.

STYLE Web Browser Support:

HTML Versions

STYLE Attributes:

STYLE End Tag:

</style> REQUIRED


style sheet notation. The following tags are valid within the STYLE tag:

STYLE Valid Context:

The STYLE tag is valid within the following tags:

STYLE Usage:

basic style sheet

<style type="text/css">
h1 {
  color : #ff0000;
p {
  font-face : "arial, sans-serif";

STYLE Special Notes:

  • Using the STYLE tag to create embedded style sheets is better than using the style attribute to create inline styles on tags, but the best way to attach style sheets to your documents is with External Style Sheets.
  • The STYLE tag should never appear outside of the HEAD tag. If you are using JavaScript to modify web page styles, you should put those scripts in the HEAD of the document as well, so they don’t add the styles to the BODY of the document by mistake.

More STYLE Information:

©2014 About.com. All rights reserved.