Combining Rules

Rules can be combined. The following two sets of style rules would produce identical results. Rules can be listed separately:

p {color: black;}
p {background-color: teal;}
p {padding: 1em;}
p {margin: 1em;}
p {font-family: helvetica, sans-serif;}
p {text-align: justify;}

Or, rules can be grouped. Property:Value pairs need to be separated by a semicolon.

p {
     color: black;
     background-color: teal;
     padding: 1em;
     margin: 1em;
     font-family: helvetica, sans-serif;
     text-align: justify;
}

Copyright © David Heitmeyer