improve validation by making HTML more correct