In HTML, some elements can be improperly nested within each other, making them overlap. Although overlapping is illegal in HTML, browsers will still display the document. In XHTML, there must be no overlapping, whatsoever. All the elements must be nested properly. This means that if an opening tag placed inside another element, the closing tag must also be placed within the same element.
Do not overlap elements like this:
All elements must be properly nested within each other, like this: