The <style> tag is used to define style information for an HTML document.
Supported In HTML4: Yes
Supported In HTML5: Yes
HTML4 vs HTML5 Differences: The scoped attribute is new in HTML 5, which allows you to define styles for a specified section of your document, instead of the entire document. If the "scoped" attribute is present, the styles only apply to the style elements parent element and its child elements.
Attributes
| Title | Values | Description | HTML4 Support | HTML5 Support |
| type | text/css | Defines the content-type | Yes | Yes |
| media | screen tty tv projection handheld print braille aural all | The destination medium for the style information | No | No |
| scoped | scoped | If present, the styles should ONLY apply to the style elements parent element and its child elements. | No | No |
Standard Attributes
All standard attributes are supported.
Event Attributes
All event attributes are supported.
HTML5 Tags
- a
- abbr
- acronym
- address
- applet
- area
- article
- aside
- audio
- b
- base
- basefont
- bdo
- big
- blockquote
- body
- br
- button
- canvas
- caption
- center
- cite
- code
- col
- colgroup
- command
- datalist
- dd
- del
- details
- dfn
- dir
- div