HTML Style <style>


The style tag defines styling at an individual page level.

While this made sense in the early days when a page had very simple styling, in current day you would probably have a CSS stylesheet which you would ‘call in’ to this document, as seen on the Link Tag page.


<!DOCTYPE html>



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



Content of the page goes here.



Required Attributes

  • None

Optional Attributes

  • Type: You can define the style type which is usually ‘text/css’, however this attribute was once required and now defaults to ‘text/css’ if not defined
  • Media: You can define what media type will display this style

Core Attributes