Skip to main content


This topic contains 1 reply, has 2 voices, and was last updated by  Beverleyh 10 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #271182


    Hi all,

    I’m new with css I am trying to do this simple site for our knowledge base. as you can see the code seems repetitive. How can we make it simple that would not make me create too many classes.

    Here is my code pen. I put my css code in the html portion as well.



    Instead of doing this;

    h1 { color:red }
    h2 { color:red }
    h3 { color:red }
    h4 { color:red }
    h5 { color:red }
    h6 { color:red }

    You can comma separate selectors with the same styles;

    h1, h2, h3, h4, h5, h6 { color:red }

    This will cut out a lot of repetition.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star