CSS rules can be located in several places

  • External style sheets
    • Text file containing style rules
    • filename.css
    • Web pages can link or import one or more external style sheets
    • Example of link:
      <link rel=”stylesheet” type=”text/css” href=”http://webdesign.karljones.com/styles/htc-dreamweaver.css” />
    • Example of import:
      <style type="text/css" media="all">
      	@import "sample_mod.css";
      </style>
  • Internal [or embedded] styles
    • <style> tag in head section of document
    • “This document only”
    • Example:
      <style>
      h2 { color:#ff0000; }
      </style>
  • Inline styles
    • style attribute of one particular tag
      <em style=”color:green;font-weight:bold;”>