ID and Class CSS selectors


Please what is the unique difference between ID and Class selector for styling HTML pages like seen in the code below

  <!-- <h1 class="title uppercase" id="article-title">Top Vacation Spots</h1> -->

Thank you.



ID’s are unique and used to target one element only it also overrides any styling that maybe setup using a class or element selection.

Classes are used to style multiple elements with the same styling; so adding the same class to multiple elements/


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.