Syntax
<STYLE>...</STYLE>
Attribute Specifications
TYPE=ContentType (content-type of style language)
MEDIA=MediaDesc (media to apply style to)
TITLE=Text (title of style sheet)
internationalization attributes (for the TITLE)
Contents:
An embedded style sheet
Contained in:
HEAD
The MEDIA attribute specifies the media on which the style sheet should be applied. This allows authors to restrict a style sheet to certain output devices, such as printers or aural browsers. The attribute's value is a comma-separated list of media descriptors. The following media descriptors are defined in HTML 4.0 and are case-sensitive:
screen (the default), for non-paged computer screens;
tty, for fixed-pitch character grid displays (such as the display used by Lynx);
tv, for television-type devices with low resolution and limited scrollability;
projection, for projectors;
handheld, for handheld devices (characterized by a small, monochrome display and limited bandwidth);
print, for output to a printer;
braille, for braille tactile feedback devices;
aural, for speech synthesizers;
all, for all devices.
Netscape Navigator 4.x incorrectly ignores any STYLE element with a MEDIA value other than screen. For example, MEDIA="screen, projection" will cause the style sheet to be ignored by Navigator 4.x, even if the presentation device is a computer screen. Navigator 4.x also ignores style sheets declared with MEDIA=all. Most other browsers ignore the MEDIA attribute.
<STYLE TYPE="text/css" MEDIA=screen>
<!--
BODY { background: url(foo.gif) red; color: black }
P EM { background: yellow; color: black }
.note { margin-left: 5em; margin-right: 5em }
-->
</STYLE>