Design comparison
SolutionDesign
Solution retrospective
Should I give IDs to ALL selective items?
Community feedback
- @xCordevaPosted about 1 year ago
Using IDs to select elements is one way to do it. However, it's generally preferred to use classes for the styling purposes. Classes offer reusability so you can apply the same class to multiple items to achieve the same styling. While an Id is often used to select a singular item and not to be reused so it kinda limits the styling process. So in terms of styling I'd say use classes.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord