3 ms·
This should be accomplished with the more semantic sectioning tags, i. e. <article> and <section>. It's possible that there are other examples where this isn't
by IfOnlyYouKnew 7y ago
This should be accomplished with the more semantic sectioning tags, i. e. <article> and <section>.
It's possible that there are other examples where this isn't possible, but I can't think of any right now. Tags can also be nested, and levels can be selected using CSS dsecendant and child combinators.
(This obviously wouldn't change OP's point)
- mstade 7y agoIronically, I actually used section tags in my original snippets but changed to divs before posting simply because I didn't want the discussion to turn into this-vs-that. :o) In any case, the point of course is that at times these groups are added to create a kinship between elements that is otherwise not possible to express via css selections, or because it just makes manipulation easier, and you don't want these grouping elements to participate in layout but the children should. In those cases, `display: contents` is the knight in shining armor.