Reputation: 61
What is the default maximum length of html input fields in a form and text area? is it limited at all?
Upvotes: 5
Views: 11790
Reputation: 1270
It seems Safari imposes a limit on text type input fields (100,000 characters I believe), but not on textareas.
Upvotes: 1
Reputation: 271
When there is no max length specified the default is an unlimited number of characters for both textarea and text input.
From the MDN web docs for textarea,
The maximum number of characters (unicode code points) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters. MDN Web Docs Textarea
for text input
If no maxlength is specified, or an invalid value is specified, the text input has no maximum length. MDN Web Docs Text Input
Upvotes: 7
Reputation: 406135
If no maxlength
attribute is specified, then there is no limit to how much text a user can enter. This is the same for a text input or a textarea.
Upvotes: 3