The Current State of HTML5 Forms

The text Type

<input type=text>
<input type=text>

Live Demo

Safari Mobile
Supported Supported Supported Supported Supported Supported Supported

The Low Down

The text input type is used to provide a one-line plain text edit control for users to input a value.

  • The default type is text, displaying a single-line text field, if the type is set to text or if the attribute is not specified.
  • In addition to the type="text" attribute/value pair, valid attributes include the global attributes, autocomplete, dirname, inputmode, list, maxlength, minlength, pattern, placeholder, readonly, required, size, value, name, disabled, and autofocus
  • If you omit the type attribute, include a value of the type attribute that is not supported by the browser (such as input type="color" in IE10), or misspell the value of the value of the type attribute, the default type="text" will show.
  • To encourage mobile devices to display a keyboard other than the default keyboard, employ the inputmode attribute.
  • To provide a list of available values, use the list attribute along with <datalist>.