Instead of deciding which semantic tag to use, can we use div and replaced them later on?
Hello all, instead of choosing which semantic html to use, can we use div then later on when we built our website to switch to another tags? Like I mean, we have a div element later on we notice that ok this is our main content, so we switch to main tag?
4 Replies
Sure! Honestly it’s better to use a div than use the wrong element.
Best option, IMO, start with
header
, body
, main
, and footer
. Throw in a nav
element if you have one.yeah true, think of that too, will just use that kind of like a template 😂
Everything else is a
div
until you have a reason to change it.
Like with CSS: make your changes additive and purposeful. There needs to be a solid reason why it’s not a div
or span
.yep noted, thanks !