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";
  • Internal [or embedded] styles
    • <style> tag in head section of document
    • “This document only”
    • Example:
      h2 { color:#ff0000; }
  • Inline styles
    • style attribute of one particular tag
      <em style=”color:green;font-weight:bold;”>