This page is part of the CSS3.info CSS selectors test. See more info on CSS3 selectors.
:lang(en) {
}
<div lang='en'></div>
The CSS selector should match the element, because the language is an exact match
:lang(en) {
}
<div lang='EN'></div>
The CSS selector should match the element, because the language is an exact match. The case of the language should not matter.
:lang(en) {
}
<div lang='en-US'></div>
The CSS selector should match the element, because the first component of the language is an exact match
:lang(en) {
}
<blockquote lang='en'>
<div></div>
</blockquote>
The CSS selector should match the inner element, because language is inherited and the language is an exact match
:lang(en) {
}
<blockquote lang='en-US'>
<div></div>
</blockquote>
The CSS selector should match the inner element, because language is inherited and the first component of the language is an exact match
:lang(en) {
}
<div></div>
The CSS selector should not match the element, because the language is not set
:lang(en) {
}
<div lang=''></div>
The CSS selector should not match the element, because the language is empty
:lang(en) {
}
<div lang='nl'></div>
The CSS selector should not match the element, because the language is different
:lang(en) {
}
<div lang='nl-en'></div>
The CSS selector should not match the element, because the first component is different. The second component should not be taken into account.
:lang(en) {
}
<div lang='enUS'></div>
The CSS selector should not match the element, because it does not match exactly. Because the hyphen is missing we are only allowed to do an exact match.
:lang(en) {
}
<div lang='en'>
<div lang='nl'></div>
</div>
The CSS selector should not match the inner element, because the inherited language is overwritten