I can't really say I found the answer, but I kind of have found a unix way to write HTML, and in any case, I'm not really writing HTML I am basically just writing documents ultimately, and it comes to documents, and the content inside it, other than that if you wanna style it or whatnot, sure! that's the fun of the internet, but its only fun if you really didn't shove it maybe with 1000 lines of nav of course, if you know what I mean.
Now, well there's HTML headers in every file, and I'm pretty sure no one really does that from the beginning by hand, honestly you might think of using some sort of SSG, but that only generates considerate to templates, there's no personal flexibility. The correct answer is always to write your website by hand, but only automate the stuff that are unbearable... that's how you work with stuff in life, critical stuff being manual, unbearable stuff being automatic. It can never be fully automatic and also be very customisable after all.
That's why my answer is to basically make pre-html docs, that has a few stuff already written... I am not sure if I explained this correctly, but what I mean that you make few HTML documents for stuff like the header of a HTML document until body, then doing the smaller stuff by hand, adding tables from a pre constructed table format in table.html and pre constructed unordered list, ordered list and whatnot in separate files and you basically echo >> them into the resulting file. you are seriously making documents way faster with this way. Honestly constructing HTML by hand is a pain in the damn ass, but if you can do it like this and pre construct the stuff you are gonna repeatedly use in later documents this could be very helpful in writing difficult webpages or... I mean documents. in any case this is a fine idea I recommend you trying! lemme know in emails if they actually helped... maybe.