Selector API - Selector Group (OR,Union)

Chrome Devtool Selector


selector can be grouped to form another selector on a union level with a comma.

Example: selector a or selector b

a, b

You can make an intersection (and) on a attribute level.

On a element level, it has no sense to want to select the element A and the element B as it will always never return any node in the tree.

Example: The element E with the attribute att that has the value foo and the attribute att2 that has the value bar



An union or an or is accomplished be separating the selector by a comma.

Example: .a, .b

#IdName, .className  { color:blue; }
  • The HTML
<div id="IdName">The blue color CSS style will be applied on this text</div>
<div class="className">and also on this one</div>
  • The result:

Discover More
Chrome Devtool Selector
Selector - Pseudo Class

A pseudo-class is a keyword added to operator that specifies a special state of the element to be selected. Logical Pseudo-class (:matches, :not, :has ) Tree Pseudo-class (:root, :empty, :blank,...
Chrome Devtool Selector
Selector API

API A selector is a boolean expression (known also as predicate) that match against elements in a DOM tree in order to select one or several node. This API was known before as the CSS and was renamed...

Share this page:
Follow us:
Task Runner