Classes and IDs are very helpful in CSS, as they allow you to target and apply styling to specific or multiple tags without selecting the general tag. Classes and IDs work exactly the same except for one difference: You can only use one ID name in the entire document, while classes don’t care how many times you repeat the class name.

IDs are almost never used because of that detail, because they aren’t future-proof for any other CSS tag attribute that might want to use the styling bound to that ID name.

By Levi

Leave a Reply

Your email address will not be published. Required fields are marked *