CSS3 Selectors: Universal selector *

This entry is part 4 of 40 in the series CSS3 Selectors

A universal selector * will select any html element.

In the example below, both the <h2> and <p> elements have been selected.

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Codecrawl.com</title>
    <style>
        * {
            color: blue;
        }
    </style>
</head>
<body>
<h2>Taylor Swift</h2>
<p> Swift moved to Nashville, Tennessee, at the age of 14 to pursue a career in country music.</p>
</body>
</html>

Series Navigation<< CSS3 Selectors: Groups of selectors
CSS3 Selectors: Class selectors >>