DEV Community

Discussion on: Stop using so many divs! An intro to semantic HTML

Collapse
 
t6nut profile image
Tõnu Trubetsky • Edited

Great and informative article! While using this kind of structure I sometimes struggled with adding css on these elements because depending on the design I would need to style sections or main elements etc. But I've researched that some of those elements shouldn't really be styled directly so then I would have to wrap a section over a div? Or what would be the best practice while thinking of styling all these different html5 elements?

Collapse
 
kenbellows profile image
Ken Bellows

Hm, I'm not sure what you mean. Do you have a specific example? I haven't heard of anyone saying you shouldn't style a <main> or a <section> directly