I have found that my HTML is, to be honest, very clunky. Small, simple pages are OK. But there comes a point when between indenting and the kinds of tags I have, it’s impossible to keep lines short. Is there a W3C (or otherwise ‘official’ or well accepted) formatting guide for clean, maintainable HTML? If not, what suggestions can the community provide?
Share
My advice is to not even worry about it. HTML and XML, unlike most languages, are almost trivial to re-indent to any style the programmer wants. In HTML I use width-2 tabs, and regularly have sections that run off the edge of the editor window. There’s not really any way to avoid that unless you just skip indenting sections of the document.