To be well formed a document needs to comply to the following rules: it contains a root element
all other elements are children of the root element
all elements are correctly paired
the element name in a start-tag and an end-tag are exactly the same attribute names are used only once within the same element