This page contains some tests on section 4 of the CSS 2.1 specs. As this page includes much of test code, the embedded CSS won't validate.
The following data types can occur in whitespace (token S):
| Name | Unicode |
|---|---|
| space | 0020 |
| tab | 0009 |
| line feed | 000A |
| carriage return | 000D |
| form feed | 000C |
The following data types are never part of whitespace:
| Name | Unicode |
|---|---|
| em space | 2003 |
| ideographic space | 3000 |
declaration : DELIM? property S* ':' S* value;
This paragraph should not be green.
This paragraph should not be red.
p#green1 {color:'\0020'green;}
p#red1 {color:\0020 red;}
All browser ignore the declarations after the insertion of Unicode code.
This paragraph should be red.
p[title="public class foo\
{\
private int x;\
\
foo (int x) {\
this.x = x;\
}\
\
}"] {color: red}
Standard compliant browsers, which support the attribute selector, do not apply the declaration.
This paragraph should be only red.
p#red2 {color: red; lightness: 10%;}
Only IE6 (Win) doesn't apply the 'color' declaration.
This paragraph should have no border.
p#border {border-width: 3}
All browsers ignore the above declaration.
This paragraph should be green.
p#green {color: green; color}
Only IE6 (Win) doesn't apply the 'color' declaration.
This paragraph should not be green.
@media paper {
p#green2 {color: green}
}
All browsers ignore the above declaration.
This paragraph should be blue.
p#blue {color: blue
Only Opera 9 and IE5 (Win) close the open parentheses and apply the declaration.
This paragraph should be only green.
p {
color: green;
font-family: 'Courier New Times
color: red;
color: green;
}
All browsers apply only the 'color: green' and 'color: green' declarations.