<STYLE ...>
| |
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.