Home  »  CodeSnippets   »   CSS Multiple Classes Targeting a Single HTML Element

CSS Multiple Classes Targeting a Single HTML Element

Posted: March 5, 2022 | by Michael Bright

CSS multiple classes example snippet.

HTML code example.

<div class="firstClass secondClass">
  ...
</div>

Corresponding CSS code for the above example.

.firstClass.secondClass {
  ...
}

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.