HTML and CSS Reference
In-Depth Information
Name
style
Synopsis
<style> . . . </style>
Inserts one or more style rules (commonly Cascading Style Sheets) into the document. The
style
element should not be confused with the global
style
attribute for applying styles to
an individual element.
Notes
In HTML5, the
style
element may be used in the content of the document. In HTML 4.01, it
must appear in the
head
of a document.
Usage
Categories:
Metadata content, flow content (if the
scoped
attribute is present)
Permitted contexts:
Where metadata is expected or in a
noscript
element that is the child of a
head
element.
If the
scoped
attribute is present, where flow content is expected, but before any other
flow content other than interelement whitespace and not as the child of an element whose
content model is transparent.
Permitted content:
Style rules, dependent on the value of the
type
attribute. HTML5 assumes the styling lan-
guage to be in CSS syntax.
Start/end tags:
Required/Required