Look at the text - it should not be the font face
red
and it should not be larger than in the paragraphs below. If the color of this text is red and it is larger than other basic text, the browser reads the incorrect set @import at-rule.
With MS IE 6.0 for Windows the behavior is DTD-dependent. It and some other browsers have so-called DTD-switch. This document is HTML 4.01 Strict. The version, which doesn't have the DTD-declaration.
From the following texts it is possible to see browser accept invalid class and id names, when the names have been judged according to the CSS-specifications. It is however remarkable that specifications are different. I list below remarkable differences:
_) is not allowed at all and names of id and class attributes should not start with hyphen (-). Also the original CSS2 specification expects the same. Some browsers. In situations, where the browser supports only CSS1 the test text should be black.id and class attributes can start with the hyphen. Browsers are not need yet to support this. I have marked the test text as lime with black background as the mark of future oriented implementation.Browsers are not fair to compare with each others. Instead they should compare to the specification, which they are intended to support (the browser factory had informed, that the browser should work according to certain specification) or what kind of support they can be expected according to the age of the browser.
If the browser support the names of class and id according to the expected behavior I have marked the implementation with the image
.
If the browser supports such names, which are illegal in all CSS-specifications or the browser supports such names, which are not expected it to be support I have marked the implementation with the image
. If the implementation is total incorrect because the breaks all CSS-specifications the test text is red.
Browsers, which I and a Mac user have been tested accept names of id and class selectors at the following ways (if not otherwise informed all browsers are Windows browsers; st.-comp = standard-compliant
):
| MS IE 4.0 | MS IE 5.0 | MS IE 5.5, MS IE 6.0 non-st.-comp. |
MS IE 6.0 st.-comp., MS IE 5.0 for Mac |
Netscape 4.04 | Netscape 4.79 | Netscape 6.0 | Mozilla 0.9+, Netscape 6.1+ | Opera 5.12, Opera 5.0 Beta 4 for Mac | Opera 6.0x | Opera 7.0 Beta1 | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Expected support: | CSS1 | CSS2 | CSS2 | CSS2 | CSS1 | CSS2 | CSS2 | CSS3 | CSS1 | CSS2 | CSS2.1 | |
| 1. | Here is |
|||||||||||
| 2. | Here is |
|||||||||||
| 3. | Here is |
|||||||||||
| 4. | Here is |
|||||||||||
| 5. | Here is |
|||||||||||
| 6. | Here is |
Notes: