Notes on CSS The @import directive: [Source: Cascading Style Sheets: The Definitive Guide, 2nd Ed., sect 1.4.3] @import url(sheet2.css); @import url(http://foo.bar.com/superstyles.css); * must appear in a style sheet BEFORE any other rules * can appear in embedded or external style sheets * ignored by some older browsers Comments in CSS /* this is a comment */ /* this is a comment that spans multiple lines */ p {color: red;} /* this is probably a mistake em {color: green;} that will be tough to spot */ Inline CSS

This text will appear highlighted

class rules .highlighted {background-color: yellow;} id rules #courseNumber {font-family: sans-serif; background-color: yellow;} Advanced Selectors attribute values From: Cascading Style Sheets: The Definitive Guide, 2nd Edition, sect 2.4 This selects any img element with an attribute called "title" that has a value containing the word "Figure". img[title~="Figure"] {border: 1px solid gray;} From: Cascading Style Sheets: The Definitive Guide, 2nd Edition, sect 2.5.4 h1 + p {margin-top: 0;} paragraphs that immediately follow an h1 element... NOTE: probably not good to use... Not supported in IE through IE6...