I'm a full-stack developer with a passion for building beautiful and accessible UI. Everyone has a place on the internet, and it's up to developers to keep it that way.
Accessibility First DevRel. I focus on ensuring content created, events held and company assets are as accessible as possible, for as many people as possible.
The example of #header in particular is rather poorly chosen. <header> is a very good and descriptive replacement for ye olde <div id="header">. With complex layouts you'll still end up with div soup, but I would even disagree with the point entirely: browser dev tools render succinctly without comments, and your templating language (especially in JS-heavy environments) should support sufficient encapsulation to make the individual div soups relatively shy of nesting.
I'm a full-stack developer with a passion for building beautiful and accessible UI. Everyone has a place on the internet, and it's up to developers to keep it that way.
You know, I've never thought of div tag sorting, but seeing it here it's so obvious and clean 😎
It shouldn't be unnecessary if you follow point 8 though as you shouldn't need or have div soup anymore. 🤔
The example of
#header
in particular is rather poorly chosen.<header>
is a very good and descriptive replacement for ye olde<div id="header">
. With complex layouts you'll still end up with div soup, but I would even disagree with the point entirely: browser dev tools render succinctly without comments, and your templating language (especially in JS-heavy environments) should support sufficient encapsulation to make the individual div soups relatively shy of nesting.Your and InHuOfficial's comments are good points! Semantic HTML always wins.