CSS: Single and multiple rules

This entry is part 5 of 26 in the series Basic CSS

To apply a multiple rules to a single tag, or a single rule on multiple tags we can use the following.

  <style type='text/css'>
      //multiple rule on a single tag
        h1 {
            color: red;
            font-size: 14px;
      //single rule on multiple tags
        h1, h2, h3, h4, h5, h6 {
            color: red;


Series Navigation<< CSS: Multiple rules within one style section
CSS: Styling horizontal line with CSS >>

Leave a comment

Leave a Reply