5

What is the default maximum length of html input fields in a form and text area? is it limited at all?

Mr.John
  • 61
  • 1
  • 2
  • Unlimited, see [textarea](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) maxLength attribute – Adam H Nov 27 '18 at 21:17

3 Answers3

7

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

David Ordaz
  • 241
  • 1
  • 2
  • 7
3

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.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
1

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

Nathan Sutherland
  • 1,191
  • 7
  • 9