I am wondering if it may be because the closing </html> should be the very last entry on the page below everything else. The html is the instruction for the browser on how to render the page.
Try moving it down to below the rest of your work and see how what happens.