Writing good HTML is a craft
From Garrett Dimon’s Front-End Architecture: Markup is the Technical Foundation
Treat your markup as art. It’s a craft, mold it and tweak it until it’s just right.
Right on. It’s amazing how much easier everything gets when you’re dealing with properly structured markup instead of non-semantic nonsense. Whether you’re applying CSS, manipulating the DOM, adding new content, or restructuring the entire document you will thank yourself (or the person who created the markup) for thinking things through instead of just slapping the markup together.
Of course this isn’t always as easy as you want it to be, especially when there are multiple ways of marking up a particular part of the document. It isn’t always obvious which type of list to choose, for instance. Another difficult scenario is when there is no semantic match in HTML, which means you need to pick the second best option.
Despite the difficulties that occur from time to time I think spending a few minutes to get the markup right is well worth it down the line.