having multiple body tags in the page is the most likely cause of the problem.
you need to remove the body tags from the library item
there should only ever be one opening body tag on the page, and one closing body tag.
it may also be that you have multiple head tags, or multiple HTML tags, those can also cause the error.
it could also be caused by having an opening div, span or other tag that never gets close or having to many closing tags so that a div that is never started is being opened.