The HTML <style> tag is used for declaring style sheets within the head of your HTML document. Check out all the CSS Properties that you can use in your style sheets.

Example Code:
    <style type="text/css">
      h1 { color:#800000 }
    <h1>The <style> tag in action</h1>

Attribute Definition
type Specifies the style sheet language as a content-type (MIME type).
media Specifies the device the document will be displayed on. Possible values:
  • all
  • braille
  • print
  • projection
  • screen
  • speech
Global Attributes:

The <style> tag also supports the Global Attributes in HTML5

Event Attributes:

The <style> tag also supports the Event Attributes in HTML5

Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.