In short, yes.
But, good HTML does not automatically mean you will get more traffic, so the fact that you have not seen an increase may not have anything to do with your HTML.
To your questions about HTML, some ways that bad HTML can affect your search engine indexing and traffic.
Sign-up for Google Webmaster tools, go to Search Appearance, then to HTML Improvements. Notice that there is a section labeled "Non-indexable content". If HTML is so malformed, then search engines might not even be able to index it.
Use Google PageSpeed Insights. Page loading time is part of Google's ranking algorithm, and malformed HTML will slowdown your page rendering.
Even if you do not have advertisements, you can sign up for Google AdSense. AdSense gives you a "Site Health" score. From the explanation of the score:
We’ve analyzed how well your pages with the highest number of ad
requests perform on desktop computers. Improving the performance of
these pages can lead to an improved experience for your users and
increased traffic and earnings.
Jakob Nielsen, a usability expert, says that response times longer than two seconds cause users to leave your site and that response times longer than 10 seconds cause users to assume your site is completely broken. In other words, long response times will increase your bounce rate and reduce your page views per session. Malformed HTML increases page loading times.