3 ms·
I use nearly the full set of semantic elements, but I think they're a pretty stupid idea in general. They only properly make sense when the actual semantics of
by parenthephobia 10y ago
I use nearly the full set of semantic elements, but I think they're a pretty stupid idea in general. They only properly make sense when the actual semantics of your content happens to align with what the authors of the specification had in mind.
For the high-level layout elements it's not so bad, but the <i> element being defined as indicating things such as "taxonomic designation, technical terms, foreign idioms, transliterations, thoughts, ship names, or dream sequences" renders it basically pointless. The HTML spec encourages you to use a class attribute to identify why <i> is being used, but then you might as well use <span>.
Most browsers - maybe all modern browsers - actually accept made-up elements and let you apply CSS to them. There's no good reason - other than compatibility - why authors shouldn't create ad-hoc elements - e.g. <dream> or <tabs> - that match up with the true semantics of the content.