Consistently format HTML

http://stackoverflow.com/a/10888837