HTML+CSS Internationalization Tests
Selectors
This page groups together pages being developed by the Internationalization Core Working Group to assess internationalization support of user agents. These tests are still under development and should not be taken as final.
Note that Internationalization WG tests do not only test conformance with W3C standards. In some cases the tests also allow for exploration of the behavior of user agents in ways not described by the standards.
Normalization [results]
- markup precomposed, CSS precomposed
A fully precomposed class name will match a fully precomposed CSS selector name.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - markup decomposed, CSS decomposed
A fully decomposed class name will match a fully decomposed CSS selector name.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - markup decomposed, CSS precomposed
A fully decomposed class name will NOT match a fully precomposed CSS selector name.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - markup precomposed, CSS decomposed
A fully precomposed class name will NOT match a fully decomposed CSS selector name.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - markup partially decomposed, CSS precomposed
A partially decomposed class name will NOT match a fully precomposed CSS selector name.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - markup partially decomposed, CSS decomposed
A partially decomposed class name will NOT match a fully decomposed CSS selector name.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - markup precomposed, CSS partially decomposed
A partially decomposed CSS selector name will NOT match a fully precomposed class name.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - markup decomposed, CSS partially decomposed
A partially decomposed CSS selector name will NOT match a fully decomposed class name.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - selectors with different normalization
Selectors that only differ due to normalization should be treated as different.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - normalization during transcoding
[Exploratory test] Text is not normalized during transcoding when the style sheet is in another encoding.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1
:lang with lang [results]
- :lang(es), lang="es"
A :lang value that matches an identical lang attribute value will produce styling.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(es), lang="ES"
A :lang value will match a lang attribute value regardless of case differences.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(es), lang="es-MX"
A :lang value will match a lang attribute value when the latter contains additional subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(es-MX), lang="es"
A :lang value will not match a lang attribute value when the former contains more subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - lang(es), lang="mx-es"
When the :lang value uses a single subtag, it will not match against an attribute value where it appears in a different position.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(en-GB), lang="en-GB"
A :lang value with language and region subtags will match a lang attribute value with the same subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(en-GB), lang="en-GB-scouse"
A :lang value with a multiple subtags will match a lang attribute value with multiple subtags as long as the first part is the same.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(en-GB), lang="en-US"
A :lang value and a lang attribute value will not match if their region subtags differ.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(az-Arab-IR), lang="az-Arab-IR"
A :lang value with language, script and region subtags will match a lang attribute value with the same language, script and region subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(az-Arab-IR), lang="az-IR"
A :lang value with language, script and region subtags will not match a lang attribute value with the script subtag missing.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(cs-CZ), lang="cs-Latn-CZ"
A :lang value with language and region subtags will not match a lang attribute value with language, script and region subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(az-Arab-IR), lang="az-arab-IR"
A :lang value will match a lang attribute value regardless of case differences in the script tag.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang, Inheritance by inline elements
When styling is defined for a block element using :lang and the lang attribute, the styling should still be picked up by inline elements contained by that block element.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang, Inheritance from an ancestor, block elements
When styling is defined for a block element using :lang but the language is only declared using a lang attribute on an ancestor element, the styling should still be picked up.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang, Inheritance from an ancestor, inline elements
When styling is defined for an inline element using :lang but the language is only declared using a lang attribute on an ancestor element, the styling should still be picked up.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1
:lang with xml:lang [results]
- :lang(es), xml:lang="es"
A :lang value that matches an identical xml:lang attribute value will produce styling in pages served as XML, but not pages served as HTML.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(es), xml:lang="ES"
A :lang value will match an xml:lang attribute value regardless of case differences.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(es), xml:lang="es-MX"
A :lang value will match an xml:lang attribute value when the latter contains additional subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(es-MX), xml:lang="es"
A :lang value will not match an xml:lang attribute value when the former contains more subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - lang(es), xml:lang="mx-es"
When the :lang value uses a single subtag, it will not match against an xml:lang attribute value where that value appears in a different position.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(en-GB), xml:lang="en-GB"
A :lang value with language and region subtags will match a xml:lang attribute value with the same subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(en-GB), xml:lang="en-GB-scouse"
A :lang value with a multiple subtags will match a xml:lang attribute value with multiple subtags as long as the first part is the same.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(en-GB), xml:lang="en-US"
A :lang value and a xml:lang attribute value will not match if their region subtags differ.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(az-Arab-IR), xml:lang="az-Arab-IR"
A :lang value with language, script and region subtags will match a xml:lang attribute value with the same language, script and region subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(az-Arab-IR), xml:lang="az-IR"
A :lang value with language, script and region subtags will not match a xml:lang attribute value with the script subtag missing.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(cs-CZ), xml:lang="cs-Latn-CZ"
A :lang value with language and region subtags will not match a xml:lang attribute value with language, script and region subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang(az-Arab-IR), xml:lang="az-arab-IR"
A :lang value will match an xml:lang attribute value regardless of case differences in the script tag.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang, Inheritance by inline elements
When styling is defined for a block element using :lang and the xml:lang attribute, the styling should still be picked up by inline elements contained by that block element.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang, Inheritance from an ancestor, block elements
When styling is defined for a block element using :lang but the language is only declared using an xml:lang attribute on an ancestor element, the styling should still be picked up.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - :lang, Inheritance from an ancestor, inline elements
When styling is defined for an inline element using :lang but the language is only declared using an xml:lang attribute on an ancestor element, the styling should still be picked up.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1
lang and xml:lang precedence [results]
- :lang, xml:lang vs. lang
When an xml:lang attribute and a lang attribute on the same element have different values, the xml:lang value will match pages served as application/xhtml+xml, and the lang value will match pages served as text/html.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1
lang |= with lang [results]
- [lang|="es"], lang="es"
A lang|= value that matches an identical lang attribute value will produce styling.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="es"], lang="ES"
A lang|= value will match a lang attribute value regardless of case differences.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="es"], lang="es-MX"
A lang|= value will match a lang attribute value when the latter contains additional subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="es-MX"], lang="es"
A lang|= value will not match a lang attribute value when the former contains more subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="es"], lang="mx-es"
When the lang|= value uses a single subtag, it will not match against an attribute value where it appears in a different position.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="en-GB"], lang="en-GB"
A lang|= value with language and region subtags will match a lang attribute value with the same subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="en-GB"], lang="en-GB-scouse"
A lang|= value with a multiple subtags will match a lang attribute value with multiple subtags as long as the first part is the same.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="en-GB"], lang="en-US"
A lang|= value and a lang attribute value will not match if their region subtags differ.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="az-Arab-IR"], lang="az-Arab-IR"
A lang|= value with language, script and region subtags will match a lang attribute value with the same language, script and region subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="az-Arab-IR"], lang="az-IR"
A lang|= value with language, script and region subtags will not match a lang attribute value with the script subtag missing.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="cs-CZ"], lang="cs-Latn-CZ"
A lang|= value with language and region subtags will not match a lang attribute value with language, script and region subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang|="az-Arab-IR"], lang="az-arab-IR"
A lang|= value will match a lang attribute value regardless of case differences in the script tag.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - lang|=, Inheritance by inline elements
When styling is defined for a block element using lang|= and the lang attribute, the styling should still be picked up by inline elements contained by that block element.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - lang|=, Inheritance from an ancestor, block elements
When styling is defined for a block element using lang|= but the language is only declared using a lang attribute on an ancestor element, the styling should NOT be picked up.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - lang|=, Inheritance from an ancestor, inline elements
When styling is defined for an inline element using lang|= but the language is only declared using a lang attribute on an ancestor element, the styling should NOT be picked up.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1
lang|= in XML [results]
- [xml|lang|="es"], xml:lang="es" with @namespace
An xml|lang|= selector with an @namespace declaration that matches an identical xml:lang attribute value will produce styling.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [xml|lang|="es"], xml:lang="es" with no @namespace
An xml|lang|= selector with no @namespace declaration that matches an identical xml:lang attribute value will not produce styling.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - xml\:lang|=, xml:lang
[Exploratory test] An xml\:lang|= selector with a value that matches an xml:lang attribute value will not produce styling for documents served as XML if the browser supports namespace declarations, but will otherwise.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1
lang= with lang [results]
- [lang="es"], lang="es"
A lang= value that matches an identical lang attribute value will produce styling.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="es"], lang="ES"
A lang= value will match a lang attribute value regardless of case differences.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="es"], lang="es-MX"
A lang= value will not match a lang attribute value when the latter contains additional subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="es-MX"], lang="es"
A lang= value will not match a lang attribute value when the former contains more subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="es"], lang="mx-es"
When the lang= value uses a single subtag, it will not match against an attribute value where it appears in a different position.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="en-GB"], lang="en-GB"
A lang= value with language and region subtags will match a lang attribute value with the same subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="en-GB"], lang="en-GB-scouse"
A lang= value with a multiple subtags will not match a lang attribute value with multiple subtags if the latter has more subtags, even if the first two subtags are the same.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="en-GB"], lang="en-US"
A lang= value and a lang attribute value will not match if their region subtags differ.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="az-Arab-IR"], lang="az-Arab-IR"
A lang= value with language, script and region subtags will match a lang attribute value with the same language, script and region subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="az-Arab-IR"], lang="az-IR"
A lang= value with language, script and region subtags will not match a lang attribute value with the script subtag missing.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="cs-CZ"], lang="cs-Latn-CZ"
A lang= value with language and region subtags will not match a lang attribute value with language, script and region subtags.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [lang="az-Arab-IR"], lang="az-arab-IR"
A lang= value will match a lang attribute value regardless of case differences in the script tag.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - lang=, Inheritance by inline elements
When styling is defined for a block element using lang= and the lang attribute, the styling should still be picked up by inline elements contained by that block element.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - lang=, Inheritance from an ancestor, block elements
When styling is defined for a block element using lang= but the language is only declared using a lang attribute on an ancestor element, the styling should NOT be picked up.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - lang=, Inheritance from an ancestor, inline elements
When styling is defined for an inline element using lang= but the language is only declared using a lang attribute on an ancestor element, the styling should NOT be picked up.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1
lang= in XML [results]
- [xml|lang="es"], xml:lang="es" with @namespace
An xml|lang= selector with an @namespace declaration that matches an identical xml:lang attribute value will produce styling.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - [xml|lang="es"], xml:lang="es" with no @namespace
An xml|lang= selector with no @namespace declaration that matches an identical xml:lang attribute value will not produce styling.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1 - xml\:lang=, xml:lang
[Exploratory test] An xml\:lang= selector with a value that matches an xml:lang attribute value will not produce styling for documents served as XML if the browser supports namespace declarations, but will otherwise.
HTML4 HTML5 XHTML1.0html XHTML1.0xml XHTML5 XHTML1.1