Since we have HTML not XHTML, there should be no issue with un-closed tags. (Personally i’m all for XML validity :))
However, yes there are a number of validation issues that really should not happen, like , between attributes. These should at some point be fixed, but since browser engines are nice enough to ignore these issues and make it work anyways, it shouldn’t be a priority or be part of our test suite, I think.
There are cases where browsers start acting weird with invalid HTML code, most of the time rendering issues including CSS bugs. In these case the first thing should be validating the pages source code static and dynamic (react components, etc.).
There is Tidy (http://www.html-tidy.org/), which does offer validation via command line, but most of the times copy&pasting to the W3C validator is quicker.
Well, unclosed div is still an issue in HTML, because you can easily run into issues in the future - simple change can break things hard. Anyway, I agree with you it would be “nice” to have valid code. I made an attempt to integrate “tidy” like ruby checker into integration tests but it did not work well.