Grow your CSS skills. Land your dream job.


Last updated on:

The Universal Selector is the * in CSS. Literally the asterisk character. It is essentially a type selector that matches any type. Type meaning an HTML tag like <div>, <body>, <button>, or literally any of the others.

A common use is in the universal reset, like this:

* {
  margin: 0;
  padding: 0;

There are times when using the universal selector is implied. For instance:

*.module {  }

is exactly the same as:

.module {  }

And in fact, the specificity of those is exactly the same, as the universal selector hold no specificity value at all.

The universal selector also is used with "universal namespaces". It's a bit weird, so I'll just let this simple demo speak for itself.

Other Resources

Browser Support

Chrome Safari Firefox Opera IE Android iOS
Any Any Any Any Any Any Any


  1. manojhl123
    Permalink to comment#

    In wordpress TwentyThirteen theme i found this styling


    It is used to clear the float
    but i don’t understand this type of styling does any one know how it works.

    what’s that [ ] signifies plz expalin the syntax

    • Matt
      Permalink to comment#

      I think it’s pointing to any element with a class that begins with (*=) the word “content.”

    • Dinu
      Permalink to comment#

      I think it’s pointing to any element with a class name that contains the word “content”, like content-wrap

  2. Permalink to comment#

    > rmniytrlykkleryklklernyl

Leave a Comment

Posting Code

  • Use Markdown, and it will escape the code for you, like `<div class="cool">`.
  • Use triple-backticks for blocks of code.
      <h1>multi-line block of code</h1>
      <span>be cool yo.</span>
  • Otherwise, escape your code, like <code>&lt;div class="cool"&gt;</code>. Markdown is just easier though.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".