HTML <style> tag


Defines a stylesheet for an individual web page. Should be placed within the <head> tag of the document.



<style type="text/css">
p { color: blue }
h1 { font-size: 1.5em }

Required Attributes

  • type - used to specify the style type, usually "text/css"

Optional Attributes

  • media - defines what media the style should be used for - screen, tty, tv, projection, handheld, print, braille, aural, all
  • title - used to define a title for the style

Core Attributes