30+ HTML tags to consider before using a div: header footer nav main section...


30+ HTML tags to consider before using a div:

header
footer
nav
main
section
summary
caption
label
p
ul
ol
blockquote
article
aside
mark
details
fieldset
legend
form
table
figure
figcaption
progress
q
abbr
address
time
dl
dialog
s
output
var

div is a last resort.
Why does using specific tags instead of divs matter?

Because specific HTML tags make apps more:
✅ Accessible (used by screen readers)
✅ Maintainable (easier for fellow devs to read and understand)
✅ Machine parsable (SEO, metadata parsing, etc)
✅ Testable (target for tests)
Also, this is why code reviews are so critical. Enforcing good semantic markup can’t be automated. It requires a human to consider the content and context.

So, code review is an opportunity to ask: Are we using the most specific tags possible?
A number of comments below boil down to: "Picking the right tag and styling it is extra work".

Sure, overusing divs may be easier for the developer. But it hurts accessibility, SEO, testability, and readability.

Until I used a screen reader, I had no idea how bad my app was.
It’s easy to overlook useful HTML tags because there are so many.

So, I find it helpful to occasionally review the full list:

https://eastmanreference.com/complete-list-of-html-tags

View original on X