Media properties for HTML <style> tags
HTML <style> Tags
Instance
Two different styles for two different media types (computer screen and print):
media="print"
>h1 {color: #000000;} p {color: #000000;} Body {background-color: #FFFFFF;} </style>
Try it yourself.
Definition and usageThe media property is used to specify different styles for different media types.
Tip: If you want to define more than one media type in a STYLE element, use a comma-delimited list (for example: <style type= "Text/css" media= "Screen,projection" >).
Browser supportAll major browsers support the media property's "screen", "Print", and "all" values.
Note: Opera also supports "handheld" values.
Grammar<style media= "value" >
Property value
value |
Description |
Screen |
computer screen (default value). |
Tty |
A telex typewriter and a similar medium using an equal-width character grid. |
Tv |
TV type device (low resolution, limited screen tumbling capability). |
Projection |
Projector. |
Handheld |
Handheld Devices (small screen, limited bandwidth). |
Print |
Print Preview mode/print page. |
Braille |
The blind uses the word method to feed back the device. |
Aural |
Speech synthesizer. |
All |
Suitable for all devices. |
TML Print Preview issue, how to set some content does not appear on the Print preview page. How to control, there is code to see not very understand the explanation