HTML5 Tutorials & More

<style> Tag

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