Do you format display of front side code?

When generating HTML in PHP do you take the time to format it so it is readable when you view source in the browser?

E

I dont generally, which is a naughty thing i suppose. If it’s a long block of HTML i’ll escape PHP, which will revert the readability to standard HTML.

If someone’s gonna be editing my page, they’ll be looking at the PHP code anyway; the only people i can think of who would be looking at the HTML source are people who’re there to copy my formatting, so they can untangle it themselves.

I do, most of the times. I like to keep things readable so I don’t have to waste time looking for a closing div or something. Especially when the page isn’t shown the way it’s supposed to, it makes debugging a lot easier.

Yes and no. I use a templating system with braceless syntax that keeps the HTML very readable.

But I also use a whitespace stripper in production that pulls all whitespace rendering the whole thing almost completely unreadable. The reason for this is, for some reason, compression algorythms seem to perform better with the whitespace stripped.