When applying CSS styles to an element in your HTML, you’ll be using different CSS selectors to target your elements. Two of the most common selectors used in CSS are the “class” selector and the “ID” selector. There are many others, but this post will focus on these two.
Don’t use IDs as CSS selectors unless you have really good, practical reasons for doing so. Use classes abundantly and allow the natural cascade to work its magic.
Comments
Be the first to write a comment
You must me logged in to write a comment.