Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

2.2.4 [CSS-Level2-2009] Section 4.1.7, Rule sets, declaration blocks, and selectors

V0181:

The specification states:

The selector (see also the section on selectors) consists of everything up to (but 
not including) the first left curly brace ({). A selector always goes together with 
a declaration block. When a user agent cannot parse the selector (i.e., it is not 
valid CSS 2.1), it must ignore the selector and the following declaration block (if 
any) as well.

Quirks Mode and IE7 Mode (All Versions)

Bad or empty selectors are not ignored.

V0182:

The specification states:

CSS 2.1 gives a special meaning to the comma (,) in selectors. However, since it is 
not known if the comma may acquire other meanings in future updates of CSS, the 
whole statement should be ignored if there is an error anywhere in the selector, 
even though the rest of the selector may look reasonable in CSS 2.1.

Quirks Mode and IE7 Mode (All Versions)

Bad selector declarations are not ignored.

Show:
© 2015 Microsoft