Language :lang(*-CA)

The :lang() pseudo-class was introduces in CSS2. Level 4 selectors adds wildcard matching. The language pseudo-class represents an element that is in one of the languages listed as an argument.

In CSS2, wildcard matching is not possible. Level 4 selectors adds wildcards.

Browser Support

Chrome Firefox Safari Opera IE Edge
Desktop no no no no no no
Mobile no no no no no no

Syntax

E:lang(*-CA) {
/* Where this matches anything ending in "*-CA". */
}

Example

/* The following example matches all p elements with a lang attribute ending in -CA (en-CA, fr-CA). */

p:lang(*-CA) {
background-color: green
}

Information is based on Selectors Level 4 - W3C Working Draft (last updated on May 2, 2013)
Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.