Several tools exist to check HTML for syntax errors. See the WDG's list of validators for a complete overview. Don't assume that since the document renders as you expect in the browser you use, it is valid and will be displayed this way by all browsers. A browser is designed to fix bad HTML, and sometimes it may even be able to completely repair a syntax error so the result is what was intended. Test the document Even when the document passes validation, it will not necessarily work as you intended on all platforms.
Several programs are available tho check documents for stylistic problems.
Even a syntactically valid document can be hard to read because of things like forgotten alternative texts for images, unwanted whitespace, deeply nested lists or non-hierarchical use of headers.