full reformat for HTML5

Note that this will now likely not work in older versions of IE