XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / style
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
style
HTML 4.01 | HTML 5 |
<style> ... </style>
Marks style definitions, usually Cascading Style Sheets, in the head section of the document.
Notes
In HTML 5, the element style can also be used in the body section of the document.
Start/end tag
Required/required
Attributes
Internationalization, global HTML 5 attributes
id="Text"XHTML and XHTML 5. Assigns a name that uniquely identifies the element.
media="all|aural|braille|handheld|print|projection|screen|tty|tv"Specifies the output medium to which the style definitions apply. A single keyword or a comma-separated list can be specified. In HTML 4.01, the default is
screen, and in HTML 5all.scoped(scoped="scoped"in XHTML 5)HTML 5 only. Applies the style definitions only to the local document tree, that is, descendants of the element containing the
styleelement.title="Text"Gives the embedded stylesheet a title.
type="Inhaltstyp" (text/css)Required in HTML 4.01. Defines the stylesheet language. For Cascading Style Sheets (CSS, currently the only supported stylesheet type), the value is
text/css. In HTML 5, the attributetypeis optional when CSS is used.xml:space="preserve"XHTML only. Instructs XML processors to preserve whitespace within the element.
Example
<head>
<style type="text/css">
h1 {color: #666;}
</style>
<title>Wissenschaftliche Präsentation</title>
</head>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de