The biggest difference between CSS2 and CSS3 is that CSS3 has been split up into different sections, called modules. Each of these modules is making it''s way through the W3C in various stages of the recommendation process. CSS2 was submitted as a single document with all the Cascading Style Sheets information within it. Because each of the modules is being worked on individually, we have a much wider range of browser support for CSS3 modules. As with any new specification, be sure to test your CSS3 pages thoroughly in as many browsers and operating systems as you can.


CSS3 offers a bunch of new ways you can write CSS rules with new CSS selectors, as well as a new combinator, and some new pseudo-elements.


Three new attribute selectors:


1. attribute beginning matches exactly


element[foo?="bar"]


2. The element has an attribute called foo that begins with "bar" e.g. attribute ending matches exactly


element[foo&="bar"]


3. The element has an attribute called foo that ends with "bar" e.g.

attribute contains the match


element[foo*="bar"]


4. The element has an attribute called foo that contains the string "bar" e.g.