r/csshelp • u/JamieTartTuX5 • Jan 26 '24
Is it common to give elements class names that don't have any styling effects, but are only meant for semantic reasons?
3
Upvotes
r/csshelp • u/JamieTartTuX5 • Jan 26 '24
1
u/testingaurora Jan 27 '24
Semantic doesn’t refer to class names, but to html tags and roles and attributes that make a page accessible. You may give it a class in case you have to select it and want to keep your specificity level in your stylesheet instead of using its parent or sibling to select it.