HTML and CSS Reference
In-Depth Information
You may find the other types useful in niche projects. For example, if
you're designing slides for distribution on the Web after your presenta-
tion, then you may have a presentation specifically targeting projected
media (which is triggered in Opera's full-screen mode). For more on this
idea, as well as information on Opera's support of the projection media
type, read Till Halbach's article “Creating Presentations/Slideshows with
HTML & CSS” at .
Specifying Media Types
You can specify the media type associated with a block of CSS rules in
three ways: through the media attribute on the HTML <style> or <link>
element, as a parameter for the @import rule, or as a parameter on the
@media rule.
media HTML Attribute
The HTML <link> element and the <style> element have a media attri-
bute that accepts a comma-separated list of media types. The source file
linked to or the code in that <style> block will be ignored if the device
used to visit the page is of a type not listed as one of the values. In the
case of the <link> element, this means that the linked file may not be
downloaded, saving bandwidth.
<!-- stylesheets for all media -->
<link rel=”stylesheet” type=”text/css” src=”global1.css”>
<link rel=”stylesheet” type=”text/css” media=”all”
<style type=”text/css”>[...]</style>
<style type=”text/css” media=”all” >[...]</style>
(continues on next page)
Search WWH ::

Custom Search