What is the asterisk selector (known as Universal Selector)

Chrome Devtool Selector


The universal selector 1) is the star character. (asterisk U+002A

It permits to select all type of tag element. The selection matchs any tag name.


All descendant elements of the body that have a foo attribute

body *[foo]



The following expressions are equivalent

Name Expression 1 Expression 2
Element selector
Class selector
id selector

Discover More
Chrome Devtool Selector
How to select elements based on attribute ? (with the css selector API)

This page is about selector expressions that select elements based on attribute. * An ID selector and a class selector (ie selects element with ID “IdName” and the class “className”) *...

Share this page:
Follow us:
Task Runner