Accesskey n skips to in-page navigation. Skip to the content start.
These tests check whether CSS language selectors work for styling text in HTML.
The tests check expected behavior against the HTML 4.01 spec.
See the results below for user agents tested. This section summarizes the results of those tests.
All browsers support lang|= and lang= selectors as expected, except for a bug in IE7 and IE8beta where az-Arab-IR is not matched against az-arab-IR.
All browsers except IE7 support :lang as expected. IE7 does not support :lang at all, but IE8beta does.
No browser matches collapsed script subtags between language and region subtags.
No browser picks up on CSS selectors using the xml:lang (rather than lang) attribute.
These are results for the latest versions of each browser tested. Green (yes) means passed, Ochre (part) means partial pass, Red (no) means fail. Yellow (true) means that a non-normative test was answered in the affirmative, and Grey (false) means the opposite. Numbers in the table relate to notes immediately below.
| UA | IE | Firefox | Opera | Safari | IE |
|---|---|---|---|---|---|
| version | 7 | 3.0.1 | 9.51 | 3.1.2 | 8 Beta |
| OS | XP | XP | XP | XP | XP |
| date | 20080718 | 20080718 | 20080718 | 20080718 | 20080718 |
| 1 :lang(es), lang="es" | no | yes | yes | yes | yes |
| 2 :lang(es), lang="es-MX" | no | yes | yes | yes | yes |
| 3 :lang(es), lang="ES" | no | yes | yes | yes | yes |
| 4 :lang(es), lang="mx-es" | yes | yes | yes | yes | yes |
| 5 :lang(en-GB), lang="en-GB" | no | yes | yes | yes | yes |
| 6 :lang(en-GB), lang="en-GB-scouse" | no | yes | yes | yes | yes |
| 7 :lang(en-GB), lang="en-US" | yes | yes | yes | yes | yes |
| 8 :lang(en-GB), lang="en" | yes | yes | yes | yes | yes |
| 9 :lang(az-Arab-IR), lang="az-Arab-IR" | no | yes | yes | yes | yes |
| 10 :lang(az-Arab-IR), lang="az-IR" | yes | yes | yes | yes | yes |
| 11 :lang(cs-CZ), lang="cs-Latn-CZ" | yes | yes | yes | yes | yes |
| 12 :lang(az-Arab-IR), lang="az-arab-IR" | no | yes | yes | yes | yes |
| 13 Inheritance by inline elements | no | yes | yes | yes | yes |
| 14 Inheritance from an ancestor, block elements | no | yes | yes | yes | yes |
| 15 Inheritance from an ancestor, inline elements | no | yes | yes | yes | yes |
| 16 xml:lang in HTML | yes | yes | yes | yes | yes |
| UA | IE | Firefox | Opera | Safari | IE |
|---|---|---|---|---|---|
| version | 7 | 3.0.1 | 9.51 | 3.1.2 | 8 Beta |
| OS | XP | XP | XP | XP | XP |
| date | 20080718 | 20080718 | 20080718 | 20080718 | 20080718 |
| 1 :lang(es), lang="es" | yes | yes | yes | yes | yes |
| 2 :lang(es), lang="es-MX" | yes | yes | yes | yes | yes |
| 3 :lang(es), lang="ES" | yes | yes | yes | yes | yes |
| 4 :lang(es), lang="mx-es" | yes | yes | yes | yes | yes |
| 5 :lang(en-GB), lang="en-GB" | yes | yes | yes | yes | yes |
| 6 :lang(en-GB), lang="en-GB-scouse" | yes | yes | yes | yes | yes |
| 7 :lang(en-GB), lang="en-US" | yes | yes | yes | yes | yes |
| 8 :lang(en-GB), lang="en" | yes | yes | yes | yes | yes |
| 9 :lang(az-Arab-IR), lang="az-Arab-IR" | yes | yes | yes | yes | yes |
| 10 :lang(az-Arab-IR), lang="az-IR" | yes | yes | yes | yes | yes |
| 11 :lang(cs-CZ), lang="cs-Latn-CZ" | yes | yes | yes | yes | yes |
| 12 :lang(az-Arab-IR), lang="az-arab-IR" | no 1 | yes | yes | yes | no 1 |
| 13 Inheritance by inline elements | yes | yes | yes | yes | yes |
| 14 Inheritance from an ancestor, block elements | yes | yes | yes | yes | yes |
| 15 Inheritance from an ancestor, inline elements | yes | yes | yes | yes | yes |
| 16 xml:lang in HTML | yes | yes | yes | yes | yes |
Notes:
| UA | IE | Firefox | Opera | Safari | IE |
|---|---|---|---|---|---|
| version | 7 | 3.0.1 | 9.51 | 3.1.2 | 8 Beta |
| OS | XP | XP | XP | XP | XP |
| date | 20080718 | 20080718 | 20080718 | 20080718 | 20080718 |
| 1 :lang(es), lang="es" | yes | yes | yes | yes | yes |
| 2 :lang(es), lang="es-MX" | yes | yes | yes | yes | yes |
| 3 :lang(es), lang="ES" | yes | yes | yes | yes | yes |
| 4 :lang(es), lang="mx-es" | yes | yes | yes | yes | yes |
| 5 :lang(en-GB), lang="en-GB" | yes | yes | yes | yes | yes |
| 6 :lang(en-GB), lang="en-GB-scouse" | yes | yes | yes | yes | yes |
| 7 :lang(en-GB), lang="en-US" | yes | yes | yes | yes | yes |
| 8 :lang(en-GB), lang="en" | yes | yes | yes | yes | yes |
| 9 :lang(az-Arab-IR), lang="az-Arab-IR" | yes | yes | yes | yes | yes |
| 10 :lang(az-Arab-IR), lang="az-IR" | yes | yes | yes | yes | yes |
| 11 :lang(cs-CZ), lang="cs-Latn-CZ" | yes | yes | yes | yes | yes |
| 12 :lang(az-Arab-IR), lang="az-arab-IR" | no 1 | yes | yes | yes | no 1 |
| 13 Inheritance by inline elements | yes | yes | yes | yes | yes |
| 14 Inheritance from an ancestor, block elements | yes | yes | yes | yes | yes |
| 15 Inheritance from an ancestor, inline elements | yes | yes | yes | yes | yes |
| 16 xml:lang in HTML | yes | yes | yes | yes | yes |
Notes:
Tell us what you think (English).
Content first published 2005-08-03. Last substantive update 2008-07-18 14:10 GMT. This version 2008-07-18 14:10 GMT
For the history of document changes, search for results-css-lang in the i18n blog.
Copyright © 2005-2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.