HTML restructuring