Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links.
(Firefox 1)
Non-standard. Matches elements when a drag-over event applies to it.
(Firefox 1)
Non-standard. Represents an element that is the first child node of some other element.
(Firefox 1)
Non-standard. Matches an element that has focus and focus ring drawing is enabled in the browser.
(Firefox 4)
Matches any element that has its fullscreen flag set. Standardized as :fullscreen.
(Firefox 9)
Non-standard. Represents an element that is the last child node of some other element.
(Firefox 1)
Non-standard. Matches elements, such as images, that haven’t started loading yet.
(Firefox 3)
The same as :empty, except that it additionally matches elements that only contain code points affected by whitespace processing. Standardized as :blank.
(Firefox 1)
Deprecated. Represents placeholder text in an input field. Use ::-moz-placeholder for Firefox 19+.
(Firefox 4)
Non-standard. Represents any submit button when the contents of the associated form are not valid.
(Firefox 88)
Non-standard. Matches elements representing images that have been blocked from loading.
(Firefox 3)
Non-standard. Represents any validated form element whose value isn't valid
(Firefox 4)
Non-standard. Represents any validated form element whose value is valid
(Firefox 4)
Non-standard. Matches elements representing images that have been disabled due to the user’s preferences.
(Firefox 3)
Matches any element that has its fullscreen flag set.
(IE 11)
Represents placeholder text in an input field. Note: for Edge use the pseudo-element ::-ms-input-placeholder. Standardized as ::placeholder.
(IE 10)
Windows Store apps only. Applies one or more styles to an element when it has focus and the user presses the space bar.
(IE 10)
Represents an element that is in the language specified. Accepts a comma separated list of language tokens.
(Edge, IE 10)
Represents an element that is represented by the selector list passed as its argument. Standardized as :matches().
(Chrome, Safari 5)
Matches any element that has its fullscreen flag set. Standardized as :fullscreen.
(Chrome, Safari 6)
Applies while an element is being activated by the user. For example, between the times the user presses the mouse button and releases it.
Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links.
(Edge 79, Firefox 50, Safari 9, Chrome 65, Opera 52)
⚠️ Property is experimental. Be cautious when using it.️
The :blank CSS pseudo-class selects empty user input elements (eg. <input> or <textarea>).
Radio and checkbox elements can be toggled by the user. Some menu items are 'checked' when the user selects them. When such elements are toggled 'on' the :checked pseudo-class applies.
Non-standard. Indicates whether or not a scrollbar corner is present.
(Chrome, Safari 5)
⚠️ Property is experimental. Be cautious when using it.️
The :current CSS pseudo-class selector is a time-dimensional pseudo-class that represents the element, or an ancestor of the element, that is currently being displayed
Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will decrement the view’s position when used.
(Chrome, Safari 5)
Applies to the one or more UI elements that are the default among a set of similar elements. Typically applies to context menu items, buttons, and select lists/menus.
(Edge 79, Firefox 4, Safari 5, Chrome 10, Opera 10)
⚠️ Property is experimental. Be cautious when using it.️
The :defined CSS pseudo-class represents any element that has been defined. This includes any standard element built in to the browser, and custom elements that have been successfully defined (i.e. with the CustomElementRegistry.define() method).
(Edge 79, Firefox 63, Safari 10, Chrome 54, Opera 41)
The :dir() CSS pseudo-class matches elements based on the directionality of the text contained in them.
(Firefox 49)
Represents user interface elements that are in a disabled state; such elements have a corresponding enabled state.
Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed together at the same end of the scrollbar.
(Chrome, Safari 5)
Represents an element that has no children at all.
Represents user interface elements that are in an enabled state; such elements have a corresponding disabled state.
Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed after the thumb.
(Chrome, Safari 5)
When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context.
(Edge 12, Safari 6, Chrome 18, IE 8, Opera 9.2)
Same as :nth-child(1). Represents an element that is the first child of some other element.
Same as :nth-of-type(1). Represents an element that is the first sibling of its type in the list of children of its parent element.
Applies while an element has the focus (accepts keyboard or mouse events, or other forms of input).
The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the UA determines via heuristics that the focus should be made evident on the element.
(Edge 86, Firefox 85, Safari 15.4, Chrome 86, Opera 72)
The :focus-within pseudo-class applies to any element for which the :focus pseudo class applies as well as to an element whose descendant in the flat tree (including non-element nodes, such as text nodes) matches the conditions for matching :focus.
(Edge 79, Firefox 52, Safari 10.1, Chrome 60, Opera 47)
Matches any element that has its fullscreen flag set.
Represents any element that is defined to occur entirely after a :current element.
(Safari 7)
⚠️ Property is experimental. Be cautious when using it.️
:The :has() CSS pseudo-class represents an element if any of the selectors passed as parameters (relative to the :scope of the given element), match at least one element.
(Safari 15.4)
Non-standard. Applies to any scrollbar pieces that have a horizontal orientation.
(Chrome, Safari 5)
When evaluated in the context of a shadow tree, matches the shadow tree’s host element.
(Edge 79, Firefox 63, Safari 10, Chrome 54, Opera 41)
When evaluated in the context of a shadow tree, it matches the shadow tree’s host element if the host element, in its normal context, matches the selector argument.
(Chrome 35, Opera 22)
Tests whether there is an ancestor, outside the shadow tree, which matches a particular selector.
(Chrome 35, Opera 22)
Applies while the user designates an element with a pointing device, but does not necessarily activate it. For example, a visual user agent could apply this pseudo-class when the cursor (mouse pointer) hovers over a box generated by the element.
Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes.
(Edge 13, Firefox 29, Safari 5.1, Chrome 10, Opera 11)
Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will increment the view’s position when used.
(Chrome, Safari 5)
Applies to UI elements whose value is in an indeterminate state.
An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification.
⚠️ Property is experimental. Be cautious when using it.️
The :is() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form.
(Edge 88, Firefox 78, Safari 14, Chrome 88, Opera 74)
Represents an element that is in language specified.
(Edge, Chrome, Firefox 1, IE 8, Opera 8, Safari 3)
Same as :nth-last-child(1). Represents an element that is the last child of some other element.
Same as :nth-last-of-type(1). Represents an element that is the last sibling of its type in the list of children of its parent element.
When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context.
(Edge 12, Safari 5.1, Chrome 6, IE 8, Opera 9.2)
Applies to links that have not yet been visited.
⚠️ Property is experimental. Be cautious when using it.️
The :local-link CSS pseudo-class represents an link to the same document
Takes a selector list as its argument. It represents an element that is represented by its argument.
(Safari 9)
Non-standard. Applies to track pieces. Applies when there is no button at that end of the track.
(Chrome, Safari 5)
The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself) as an argument. It represents an element that is not represented by its argument.
(Edge, Chrome, Firefox 1, IE 9, Opera 9.5, Safari 2)
Represents an element that has an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element.
(Edge, Chrome, Firefox 3.5, IE 9, Opera 9.5, Safari 3.1)
⚠️ Property is experimental. Be cautious when using it.️
The :nth-col() CSS pseudo-class is designed for tables and grids. It accepts the An+B notation such as used with the :nth-child selector, using this to target every nth column.
Represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n, and has a parent element.
(Edge, Chrome, Firefox 3.5, IE 9, Opera 9.5, Safari 3.1)
⚠️ Property is experimental. Be cautious when using it.️
The :nth-last-col() CSS pseudo-class is designed for tables and grids. It accepts the An+B notation such as used with the :nth-child selector, using this to target every nth column before it, therefore counting back from the end of the set of columns.
Represents an element that has an+b-1 siblings with the same expanded element name after it in the document tree, for any zero or positive integer value of n, and has a parent element.
(Edge, Chrome, Firefox 3.5, IE 9, Opera 9.5, Safari 3.1)
Represents an element that has an+b-1 siblings with the same expanded element name before it in the document tree, for any zero or positive integer value of n, and has a parent element.
(Edge, Chrome, Firefox 3.5, IE 9, Opera 9.5, Safari 3.1)
Represents an element that has a parent element and whose parent element has no other element children. Same as :first-child:last-child or :nth-child(1):nth-last-child(1), but with a lower specificity.
Matches every element that is the only child of its type, of its parent. Same as :first-of-type:last-of-type or :nth-of-type(1):nth-last-of-type(1), but with a lower specificity.
A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional.
Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes.
(Edge 13, Firefox 29, Safari 5.1, Chrome 10, Opera 11)
Represents any element that is defined to occur entirely prior to a :current element.
(Safari 7)
⚠️ Property is experimental. Be cautious when using it.️
The :paused CSS pseudo-class selector is a resource state pseudo-class that will match an audio, video, or similar resource that is capable of being “played” or “paused”, when that element is “paused”.
⚠️ Property is experimental. Be cautious when using it.️
The :picture-in-picture CSS pseudo-class matches the element which is currently in picture-in-picture mode.
⚠️ Property is experimental. Be cautious when using it.️
The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text.
⚠️ Property is experimental. Be cautious when using it.️
The :playing CSS pseudo-class selector is a resource state pseudo-class that will match an audio, video, or similar resource that is capable of being “played” or “paused”, when that element is “playing”.
An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only.
(Edge 13, Firefox 78, Safari 4, Chrome 1, Opera 9)
An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only.
(Edge 13, Firefox 78, Safari 4, Chrome 1, Opera 9)
A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional.
When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context.
(Edge 12, Safari 5.1, Chrome 6, IE 8, Opera 9.2)
Represents an element that is the root of the document. In HTML 4, this is always the HTML element.
Represents any element that is in the contextual reference element set.
(Edge 79, Firefox 32, Safari 7, Chrome 27, Opera 15)
Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed separately at either end of the scrollbar.
(Chrome, Safari 5)
Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed before the thumb.
(Chrome, Safari 5)
Some URIs refer to a location within a resource. This kind of URI ends with a 'number sign' (#) followed by an anchor identifier (called the fragment identifier).
⚠️ Property is experimental. Be cautious when using it.️
The :target-within CSS pseudo-class represents an element that is a target element or contains an element that is a target. A target element is a unique element with an id matching the URL's fragment.
⚠️ Property is experimental. Be cautious when using it.️
The :user-invalid CSS pseudo-class represents any validated form element whose value isn't valid based on their validation constraints, after the user has interacted with it.
(Firefox 88)
⚠️ Property is experimental. Be cautious when using it.️
The :user-valid CSS pseudo-class represents any validated form element whose value validates correctly based on its validation constraints. However, unlike :valid it only matches once the user has interacted with it.
(Firefox 88)
An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification.
Non-standard. Applies to any scrollbar pieces that have a vertical orientation.
(Chrome, Safari 5)
Applies once the link has been visited by the user.
⚠️ Property is experimental. Be cautious when using it.️
The :where() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list.
(Edge 88, Firefox 78, Safari 14, Chrome 88, Opera 74)
Non-standard. Applies to all scrollbar pieces. Indicates whether or not the window containing the scrollbar is currently active.
(Chrome, Safari 3)
Represents an element that is represented by the selector list passed as its argument. Standardized as :matches().
(Firefox 4)