I’m having a hard time understanding when to use the class attribute and why I would need to use it. I have seen it used with the div tag. I have seen it used with an a tag. And I am currently learning that it can be referenced in CSS, through the Learn CSS selectors and Visual Rules session.
The thing is I still don’t understand why I would need to use the class attribute at all, as this wasn’t fully explained in the introduction to HTML course. I’ve checked the W3School website but there it mostly shows me how to use it and not why I would use it. Could anyone please explain this to me?