Mr.John
Mr.John

Reputation: 61

What is the default maximum length of html input \ text area?

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

Answers (3)

Nathan Sutherland
Nathan Sutherland

Reputation: 1270

It seems Safari imposes a limit on text type input fields (100,000 characters I believe), but not on textareas.

Upvotes: 1

David Ordaz
David Ordaz

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

Bill the Lizard
Bill the Lizard

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

Related Questions