Use Cascading Style Sheets Selectors
By Nicholas Chase2004-06-18
Summary
This article looked at the different types of selectors available within the CSS2 Recommendation. Browser support for some is limited, but CSS is designed for graceful degradation; a page should still be legible and usable if a style isn't applied. However, you should always test pages in all target browsers.
Resources
Review the Cascading Style
Sheets 2 Recommendation from the W3C.
Get up to speed on CSS by reading the Introduction to Cascading Style Sheets: Type tutorial (developerWorks, September 2001).
Read Molly E. Holzschlag's article on using class selectors to your advantage, Design Web pages with class (developerWorks, September 1999).
Learn more about CSS at the House of Style.
Get a guide to support for various CSS1 and CSS2 selectors and properties in various browsers.
Find more XML resources on the developerWorks XML zone.
Tutorial Pages:
» The basic page and the universal selector
» Type selectors
» Class selectors
» ID selectors
» Family relationships: descendants, children, and siblings
» Pseudo-classes and pseudo-elements
» Summary
First published by IBM developerWorks
