The creator of the html page will typically look at the website before he publishes it, so unlikely that someone will publish incorrect html code. It's not like html has branching logic so there's no hidden crashes, everything is explicit similar to the safety you get with type checking.
javascript is actually bad for the same reasons. It tries to correct your mistakes by doing type coercion making a null + 1 + 'blah'= "null1blah"
You'd also potentially be looking at a web that is far more unstable and crash-prone if you essentially treated a browser like a compiler or the like.