reformat the html layout