That's the idea behind the templating. If you don't like the standard HTML generation, you change the template.
However, I'm curious about what is wrong with the HTML? As far as I can see, the validation errors are caused purely by trying to accommodate IE stupidity. If it's size you're referring to, enabling mod_deflate or mod_gzip is easier.