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: Group Exercises

  • Create Groups of 4-5 people
    • 1 Recorder (in charge of the writing)
    • 1 Reporter (in charge of reporting back)
  • Write plausible HTML for this page
    • <html>
          <head>
              <title>...
    • Use tags and ID and classes
    • HINT: Think in content groups (there are at least 5)
  • Write 12 rules used for this page (based on your HTML)
    • You've seen a lot of them
    • Value: Plausible > Exact
      • Don't worry about exact numbers, colors, fonts, etc
    • If you don't know syntax, make it up
  • Write the rule that brings your CSS into the page
  • I'll move around, answering questions
  • When done, share work with class
    • Groupings:
      • Tags
      • Classes
      • IDs
    • 3 Rules