I read in the HTML5 specification that the generic div
tag should only be used as "last resort," when a more specific element is unavailable. For example, the tags header
, footer
and section
are preferred for grouping content thematically.
But it seems like the vast majority of websites still use div
as the primary element. My question is, how often and in what contexts is it appropriate to use a div
? And which other elements should be used in its place?
I'm looking for answers based on the specification rather than personal opinions. Thanks!