1. A method of restructuring an input HTML document to comply with strict HTML, said method comprising the steps of: (a) linearly traversing said input HTML document to create a hierarchical tree structure representation, said traversal maintaining a current insertion point for elements within said tree structure representation; (b) during said traversal, identifying those elements of said input HTML document that violate strict HTML and, for each said identified element: (b)(i) retracing said tree structure representation from said current insertion point to identify an further insertion point from which said identified element can depend, said retracing comprising noting each parent element of said identified element passed during said retracing; (b)(ii) at said further insertion point, creating new elements in said tree structure representation corresponding to those said parent elements passed during said retracing, said new elements being created in reverse chronological order to that encountered during said retracing; and (b)(iii) appending said identified element to a terminal one of said new elements; and (c) converting said tree structure representation into an output HTML document.