HTML5 input attribute “size” seems to be effectless
HTML5 input attribute “size” seems to be effectless
The HTML5 input attribute size is supposed to specify the size of the input field in the manner of number of characters.
But even if the input given exceeds the specified size the browser is not giving any error.
Why is this happening?
1 Answer
1
Quoting from w3schools:
"The size attribute specifies the visible width, in characters, of an <input>
element."
<input>
You can use maxlength attribute if you wish to limit the number of input characters.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.