Group Selector

     

  • We can group selectors bu using ","
  • Instead of assigning attributes multiple times, we can group the selectors and assign values at a time.
  •  

    Code:

    <html>
    <head>
    <title>This is CSS Class Selector</title>
    <style type="text/css">
    s,h1,h2,abc {
    color: red;
    font-size: 150%;
    text-align:left;
    font-family: book antiqua;
    Text-decoration: none;
    }
    </style>
    </head>
    <body>
    <s>This is about Group Selector</s>
    <h1>This is about Group Selector</h1>
    <h2>This is about Group Selector</h2>
    <abc>This is about Group Selector</abc>

    </body>
    </html>

     

     

    Output:

    Download The Coding Along With Web Page