Learn HTML Code Tutorial Reference Guide

<STYLE ...>

  • TYPE: style language
 
  • MEDIA: type of media this style applies to

<STYLE ...> designates a set of style rules. Browsers do not display the contents of <STYLE ...> but rather use those contents to set the display of other elements in the page.

See Break the <FONT> Habit for a tutorial on using styles.

<STYLE ...> should always include the TYPE attribute, which should in most situations be set to "text/css". Follow the tag with a comment opener so that older browsers and many search engines won't see your styles code. After the style rules put the end comment code and the end tag. So, for example, a minimal set of styles code might look like this:

<STYLE TYPE="text/css">
<!--
H2 {color:green}
-->
</STYLE>

<STYLE ...> only goes inside the <HEAD> element. It does not go in the <BODY ...> element.




 

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   Privacy Policy   |   About
Copyright ©1997-2002 Idocs and ©2002-2014 HTML Code Tutorial