What\'s the difference between
Class is used for multiple elements which have common attributes.Example if you want same color and font for both p and body tag use class attribute or in a division itself. Id on the other hand is used for highlighting a single element attributes and used exclusively for a particular element only.For example we have an h1 tag with some attributes we would not want them to repeat in any other elements throughout the page. It should be noted that if we use class and id both in an element,*id ovverides the class attributes.*Simply because id is exclusively for a single element Refer the below example Lorem ipsum dolor sit amet consectetur adipisicing
elit.
Perspiciatis a dicta qui unde veritatis cupiditate ullam quibusdam!
Mollitia enim,
nulla totam deserunt ex nihil quod, eaque, sed facilis quos iste. We generate the output Output