DEV Community

Discussion on: Stop using so many divs! An intro to semantic HTML

Collapse
 
kenbellows profile image
Ken Bellows

Right, and typically that's the idea. The only case where I can imagine wanting multiple <main> elements is as a short-term measure to basically preload some content in a <main hidden>, then show it and hide the other simultaneously, and delete the old one. As a variation, in a situation where you're moving through pages sequentially (chapters in an online book, for example), I could imagine keeping the previous and next both loaded in <main hidden>s, but more than that seems like a bad idea (though I'm open to counter examples)