Once I saw a page with an input tag with the maxlength field set to "2o".
In this particular case, you are talking about incorrect code. The maxlength attribute cannot contain letters, only numbers.
What browsers do with the wrong code is very different, as you can see for yourself.
If you really ask, βWhat do all the different browsers do when they come across HTML code that is broken for any of an infinite number of reasons?β, This is crazy.
We can significantly reduce the problem space using valid code.
So use valid HTML. Then you are left with two main problem areas:
- browser errors - how the browser follows the HTML standard and what it does wrong
- default differences in the browser, such as the number of padding / margins it gives the body.
source share