optimize html layout