HTML and CSS Reference
In-Depth Information
h1 {color: blue; font-style: italic}
-->
</style>
</head>
<body>
<h1>I'm so bluuuuoooo!</h1>
...
<h1>I am ba-loooooo, tooooo!</h1>
8.1.2.1. The type attribute
Other types of stylesheets are available for HTML/XHTML besides CSS.
Like the JavaScript stylesheets we describe in Chapter 12 , they are not
well supported, if at all, by the popular browsers, so we don't spend a
lot of time on them in this topic. Nonetheless, the browser needs a way
to distinguish which stylesheet you use in your document. Use the type
attribute within the <style> tag for that. All cascading stylesheets are
of the type text/css ; JavaScript stylesheets use the type text/javas-
cript . You may omit the type attribute and hope the browser figures out
the kinds of styles you are using, but we suggest you always include
the type attribute, so there is no opportunity for confusion. [ JavaScript
Stylesheets (Antiquated), 12.4 ]
8.1.2.2. The media attribute
HTML and XHTML documents can wind up in the strangest places these
days, such as on cellular phones. To help the browser figure out the best
way to render your documents, include the media attribute within the
<style> tag. The value of this attribute is the document's intended medi-
um, although it doesn't preclude rendering by other media. The default
value is screen (computer display). Other values include tty (text only),
tv (television), projection (theaters), handheld (PDAs and cell phones),
print (ink on paper), braille (tactile devices), embossed (Braille print-
 
Search WWH ::




Custom Search