The generated HTML code contains either
multiple <html> elements,
content before the opening <html> element, or
content after the closing </html> element.
The typical cause is that you embed an entire HTML document inside another HTML document. That's invalid.