Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
User Journal

Journal m0smithslash's Journal: Cascading Style Sheets: The Definitive Guide Pages 17 - 23

Cascading Style Sheets: The Definitive Guide From the first edition - 2000 - Pages 17 - 23

Use C-style comments in style sheets.

CSS styles are defined by rules. The structure of a rule is:

selector { declaration }

The selector defines which parts of the HTML document to apply the style to. The declaration describes what styles to apply. The declaration is a set of name/value pairs.

The simple selector is the same as an HTML tag: P H1 LI etc. It applies to all the tags that match it. To change all the top level headers to be red use: H1 { color: red; }

This discussion has been archived. No new comments can be posted.

Cascading Style Sheets: The Definitive Guide Pages 17 - 23

Comments Filter:

Do you suffer painful elimination? -- Don Knuth, "Structured Programming with Gotos"

Working...