Salesforce Documents use HTML format. If writing or customizing HTML code for a document, you may encounter issues caused by incorrect code. Salesforce itself doesn't have debugging software for the HTML, so you'll need to solve the issue outside of i360 and then re-upload the fixed document. Some HTML editors don't have debugging either, so what you really may need is another tool to help debug your errors, such as an "HTML Validator".
HTML Validators
One of the websites we use to validate HTML is https://validator.w3.org/nu/
This website allows you to paste raw HTML code and scan for errors. In particular, it highlights "Fatal Errors", which are denoted separately from the average "Error". Tweak your HTML to resolve each Fatal Error, and test between iterations to ensure no further Fatal Errors are found, and this should help you get a document that will work in i360.
Others have recommended Flying Saucer, which can be found here: https://github.com/flyingsaucerproject/flyingsaucer
Testing HTML code
There are several ways to test the code on the validation site referenced here. Below is a screenshot showing how to insert the raw text for testing completely in the browser without any upload of files needed.