The CSS grouping selector is used to select multiple elements and style them together.

Syntax
The syntax for CSS grouping selector is as follows −

element, element {
/declarations/
}

Example :

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Group Selector</title>
    <style>
        h1,
        h2 {
            text-align: center;
            color: magenta;
        }
    </style>
</head>
<body>
    <h1>Global</h1>
    <h2>Computer</h2>
    <h3>Education</h3>
</body>
</html>

Show Output :

CSS 10 Group Sel Image
[social_share_button themes='theme1']

Leave a Comment