HTML refinement