Cascading Style Sheets (CSS)

Monday May 14, GTC West, Class P20

CSS Syntax

selector { property: value; }

Attaching CSS

<style>
@import url('styles.css');
</style>

CSS Selectors

tag
.class
#id

CSS Units

em for text
px for rest

Right Column

CSS Controls...

  • Short Answer: Everything visual
  • More specifically, display of:
    • Fonts
    • Colors
    • Links
    • Margins, Padding, Borders
    • Positions
    • Backgrounds and Images
    • and more...
  • Some Psuedo-Code Examples
    • Set the default font
      <body>: verdana
    • Default margins, padding
      <h1>: 10 pixel top margin, 5 pixel bottom margin
      <ul>, <ol>: no bottom margin