Back to the index.
CSS2 selectors | CSS3 selectors | CSS3 UI selectors | CSS4 selectors
Here are almost all CSS2 and 3 selectors, and the CSS3 UI selectors (mostly structural pseudo-classes).
This is the mobile table. See also the desktop table.
Last major update on 1 October 2013.
I'm writing a CSS book.
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
p
|
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
p.test
|
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
p#test
|
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
p span
|
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selects all elements | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Two or more class names | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
Selects an element that is a child of another element | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selects an element that is a next sibling of another element | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
Selects an element that is a general next sibling of another element | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
Selects an element with a certain attribute | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selects an element with a certain attribute value | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selects an element with an attribute that includes a certain value; space-separated | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selects an element with a certain attribute that starts with a certain value | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selects an element with a certain attribute that ends with a certain value | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selects an element with a certain attribute that contains a certain value; not necessarily space-separated | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Attribute value starts with "value" or "value-" | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And |
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
To generate content before and after an element | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
The first letter of an element | Almost | Almost | Almost | Yes | Almost | Almost | Yes | Almost | Almost | Yes | Yes | |||||||||||||||||
|
||||||||||||||||||||||||||||
The first line of an element | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Text selected by the user. | No | Samsung | Yes | No | Yes | Yes | No | Yes | Untest |
ut | Yes | ut | Yes | ut | ut | Yes | ut | -moz- | ||||||||||
|
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
An element in an active state. | No | No | No | Yes | No | Yes | Yes | No | No | No | Alter |
No | No | Yes | Yes | |||||||||||||
Styles should be applied ontouchstart and removed ontouchend. To be honest, I don't see a lot of use for this selector on touchscreen devices.
|
||||||||||||||||||||||||||||
An element in a hovered state. | Special | Yes | Yes | Spe |
Yes | Desktop | Yes | Yes | Yes | Yes | Desk |
Yes | ||||||||||||||||
Normally the |
||||||||||||||||||||||||||||
Unvisited link | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Negation of a selector | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Element that is a target of a hash (page.html#testHash )
|
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Incom |
Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
Visited link | Yes | se | Yes | Yes | Incom |
se | Yes | Yes | Yes | se | Yes | Yes | Yes | No | Yes | |||||||||||||
There’s a security issue with
|
||||||||||||||||||||||||||||
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And |
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
Empty elements | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
An element that is the first child of its parent | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
The first element of its type. | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
An element that is the last child of its parent | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
The last element of its type. | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
Select elements according to a formula | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ||||||||||||||||||||
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ||||||||||||||||||||
Select elements according to a formula | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
An element that is the only child of its parent | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
The only element of its type. | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
|
||||||||||||||||||||||||||||
The root element, or initial containing block. | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And |
See also the CSS3 User Interface spec.
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
Checked elements (checkboxes or radios) | Yes | No | Yes | No | Yes | No | No | Yes | No | Yes | No | Yes | No | Yes | No | |||||||||||||
Default choices in select boxes or groups of radio buttons | No | No | No | No | Incom |
No | No | No | No | No | No | |||||||||||||||||
Tested on radio buttons and select boxes.
|
||||||||||||||||||||||||||||
Disabled form fields | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Non-disabled form fields | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |||||||||||||||||||
Form fields that have the keyboard focus | Yes | Yes | Yes | No | Yes | Yes | No | Yes | No | Yes | Yes | Yes | ||||||||||||||||
Sidenote: Sony Android 4 shows the label text in focused form fields. I think this is an excellent idea that deserves to be copied. |
||||||||||||||||||||||||||||
Form fields with values that are in range (numbers) | Yes | No | Yes | Yes | No | Yes | No | Yes | No | Yes | Yes | No | Yes | |||||||||||||||
|
||||||||||||||||||||||||||||
Form field with value that does not conform to pattern
|
Yes | No | Yes | Yes | Buggy | Yes | Yes | No | Yes | No | Yes | Yes | No | Yes | Yes | |||||||||||||
|
||||||||||||||||||||||||||||
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And | |||||
Non-required form fields | Yes | Yes | Yes | Buggy | Yes | Yes | Yes | Yes | No | Yes | Yes | |||||||||||||||||
|
||||||||||||||||||||||||||||
Form fields with values that are not in range (numbers) | Yes | No | Yes | Yes | No | Yes | No | Yes | No | Yes | Yes | No | Yes | |||||||||||||||
|
||||||||||||||||||||||||||||
Readonly form fields | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | No | No | ||||||||||||||||||
Non-readonly form fields | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | No | No | ||||||||||||||||||
Required form fields | Yes | Yes | Yes | Buggy | Yes | Yes | Yes | Yes | No | Yes | Yes | |||||||||||||||||
|
||||||||||||||||||||||||||||
Form field with value that conforms to pattern
|
Yes | No | Yes | Yes | Buggy | Yes | Yes | No | Yes | No | Yes | Yes | No | Yes | Yes | |||||||||||||
|
||||||||||||||||||||||||||||
Selector | iOS | Android | Chrome | Opera | Black |
Nokia | UC | Nin |
Dol |
Tizen | One | IE | Firefox | |||||||||||||||
6 | 7 | 2 | 3 | 4 | 18 | 29 | Mini | Mob 12 | Mob 15 | 6 | 7 | PB | 10 | Xpress | Mee |
Anna | Belle | 8 | 9 | 9 | 10 | OS | And |
Mobile browser test array 1.1.1; October 2013
Browsers by WebKit version: