docs.rodeo

MDN Web Docs mirror

: The HTML Input element

{{HTMLSidebar}} 

The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and {{Glossary("user agent")}} . The <input> element is one of the most powerful and complex in all of HTML due to the sheer number of combinations of input types and attributes.

{{EmbedInteractiveExample("pages/tabbed/input-text.html", "tabbed-shorter")}} 

<input> types

How an <input> works varies considerably depending on the value of its type attribute, hence the different types are covered in their own separate reference pages. If this attribute is not specified, the default type adopted is text.

The available types are as follows:

Type Description Basic Examples
`{{HTMLElement("input/button", "button")}}`  A push button with no default behavior displaying the value of the value attribute, empty by default. `{{EmbedLiveSample("examplebutton",200,55)}}` 
`{{HTMLElement("input/checkbox", "checkbox")}}`  A check box allowing single values to be selected/deselected. `{{EmbedLiveSample("examplecheckbox",200,55)}}` 
`{{HTMLElement("input/color", "color")}}`  A control for specifying a color; opening a color picker when active in supporting browsers. `{{EmbedLiveSample("examplecolor",200,55)}}` 
`{{HTMLElement("input/date", "date")}}`  A control for entering a date (year, month, and day, with no time). Opens a date picker or numeric wheels for year, month, day when active in supporting browsers. `{{EmbedLiveSample("exampledate",200,55)}}` 
`{{HTMLElement("input/datetime-local", "datetime-local")}}`  A control for entering a date and time, with no time zone. Opens a date picker or numeric wheels for date- and time-components when active in supporting browsers. `{{EmbedLiveSample("exampledtl",200,55)}}` 
`{{HTMLElement("input/email", "email")}}`  A field for editing an email address. Looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards. `{{EmbedLiveSample("exampleemail",200,55)}}` 
`{{HTMLElement("input/file", "file")}}`  A control that lets the user select a file. Use the accept attribute to define the types of files that the control can select. `{{EmbedLiveSample("examplefile",'100%',55)}}` 
`{{HTMLElement("input/hidden", "hidden")}}`  A control that is not displayed but whose value is submitted to the server. There is an example in the next column, but it's hidden! `{{EmbedLiveSample("examplehidden",200,55)}}` 
`{{HTMLElement("input/image", "image")}}`  A graphical submit button. Displays an image defined by the src attribute. The alt attribute displays if the image src is missing. `{{EmbedLiveSample("exampleimage",200,55)}}` 
`{{HTMLElement("input/month", "month")}}`  A control for entering a month and year, with no time zone. `{{EmbedLiveSample("examplemonth",200,55)}}` 
`{{HTMLElement("input/number", "number")}}`  A control for entering a number. Displays a spinner and adds default validation. Displays a numeric keypad in some devices with dynamic keypads. `{{EmbedLiveSample("examplenumber",200,55)}}` 
`{{HTMLElement("input/password", "password")}}`  A single-line text field whose value is obscured. Will alert user if site is not secure. `{{EmbedLiveSample("examplepassword",200,55)}}` 
`{{HTMLElement("input/radio", "radio")}}`  A radio button, allowing a single value to be selected out of multiple choices with the same name value. `{{EmbedLiveSample("exampleradio",200,55)}}` 
`{{HTMLElement("input/range", "range")}}`  A control for entering a number whose exact value is not important. Displays as a range widget defaulting to the middle value. Used in conjunction min and max to define the range of acceptable values. `{{EmbedLiveSample("examplerange",200,55)}}` 
`{{HTMLElement("input/reset", "reset")}}`  A button that resets the contents of the form to default values. Not recommended. `{{EmbedLiveSample("examplereset",200,55)}}` 
`{{HTMLElement("input/search", "search")}}`  A single-line text field for entering search strings. Line-breaks are automatically removed from the input value. May include a delete icon in supporting browsers that can be used to clear the field. Displays a search icon instead of enter key on some devices with dynamic keypads. `{{EmbedLiveSample("examplesearch",200,55)}}` 
`{{HTMLElement("input/submit", "submit")}}`  A button that submits the form. `{{EmbedLiveSample("examplesubmit",200,55)}}` 
`{{HTMLElement("input/tel", "tel")}}`  A control for entering a telephone number. Displays a telephone keypad in some devices with dynamic keypads. `{{EmbedLiveSample("exampletel",200,55)}}` 
`{{HTMLElement("input/text", "text")}}`  The default value. A single-line text field. Line-breaks are automatically removed from the input value. `{{EmbedLiveSample("exampletext",200,55)}}` 
`{{HTMLElement("input/time", "time")}}`  A control for entering a time value with no time zone. `{{EmbedLiveSample("exampletime",200,55)}}` 
`{{HTMLElement("input/url", "url")}}`  A field for entering a URL. Looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards. `{{EmbedLiveSample("exampleurl",200,55)}}` 
`{{HTMLElement("input/week", "week")}}`  A control for entering a date consisting of a week-year number and a week number with no time zone. `{{EmbedLiveSample("exampleweek",200,55)}}` 
Obsolete values
datetime `{{deprecated_inline}}`  A control for entering a date and time (hour, minute, second, and fraction of a second) based on UTC time zone. `{{EmbedLiveSample("exampledatetime",200,75)}}` 

Attributes

The <input> element is so powerful because of its attributes; the type attribute, described with examples above, being the most important. Since every <input> element, regardless of type, is based on the {{domxref("HTMLInputElement")}}  interface, they technically share the exact same set of attributes. However, in reality, most attributes have an effect on only a specific subset of input types. In addition, the way some attributes impact an input depends on the input type, impacting different input types in different ways.

This section provides a table listing all the attributes with a brief description. This table is followed by a list describing each attribute in greater detail, along with which input types they are associated with. Those that are common to most or all input types are defined in greater detail below. Attributes that are unique to particular input types—or attributes which are common to all input types but have special behaviors when used on a given input type—are instead documented on those types’ pages.

Attributes for the <input> element include the global HTML attributes and additionally:

Attribute Type(s) Description
accept file Hint for expected file type in file upload controls
alt image alt attribute for the image type. Required for accessibility
autocapitalize all except url, email, and password Controls automatic capitalization in inputted text.
autocomplete all except checkbox, radio, and buttons Hint for form autofill feature
capture file Media capture input method in file upload controls
checked checkbox, radio Whether the command or control is checked
dirname hidden, text, search, url, tel, email Name of form field to use for sending the element’s directionality in form submission
disabled all Whether the form control is disabled
form all Associates the control with a form element
formaction image, submit URL to use for form submission
formenctype image, submit Form data set encoding type to use for form submission
formmethod image, submit HTTP method to use for form submission
formnovalidate image, submit Bypass form control validation for form submission
formtarget image, submit Browsing context for form submission
height image Same as height attribute for {{htmlelement('img')}} ; vertical dimension
list all except hidden, password, checkbox, radio, and buttons Value of the id attribute of the {{htmlelement('datalist')}}  of autocomplete options
max date, month, week, time, datetime-local, number, range Maximum value
maxlength text, search, url, tel, email, password Maximum length (number of characters) of value
min date, month, week, time, datetime-local, number, range Minimum value
minlength text, search, url, tel, email, password Minimum length (number of characters) of value
multiple email, file Boolean. Whether to allow multiple values
name all Name of the form control. Submitted with the form as part of a name/value pair
pattern text, search, url, tel, email, password Pattern the value must match to be valid
placeholder text, search, url, tel, email, password, number Text that appears in the form control when it has no value set
popovertarget button Designates an <input type="button"> as a control for a popover element
popovertargetaction button Specifies the action that a popover control should perform
readonly all except hidden, range, color, checkbox, radio, and buttons Boolean. The value is not editable
required all except hidden, range, color, and buttons Boolean. A value is required or must be checked for the form to be submittable
size text, search, url, tel, email, password Size of the control
src image Same as src attribute for {{htmlelement('img')}} ; address of image resource
step date, month, week, time, datetime-local, number, range Incremental values that are valid
type all Type of form control
value all except image The value of the control. When specified in the HTML, corresponds to the initial value
width image Same as width attribute for {{htmlelement('img')}} 

A few additional non-standard attributes are listed following the descriptions of the standard attributes.

Individual attributes

Non-standard attributes

The following non-standard attributes are also available on some browsers. As a general rule, you should avoid using them unless it can’t be helped.

Attribute Description
incremental Whether or not to send repeated `{{domxref("HTMLInputElement/search_event", "search")}}`  events to allow updating live search results while the user is still editing the value of the field. WebKit and Blink only (Safari, Chrome, Opera, etc.).
mozactionhint `{{deprecated_inline}}` 

A string indicating the type of action that will be taken when the user presses the Enter or Return key while editing the field; this is used to determine an appropriate label for that key on a virtual keyboard. Since this attribute is deprecated, use enterkeyhint instead.

orient Sets the orientation of the range slider. Firefox only.
results The maximum number of items that should be displayed in the drop-down list of previous search queries. Safari only.
webkitdirectory A Boolean indicating whether to only allow the user to choose a directory (or directories, if multiple is also present)

Methods

The following methods are provided by the {{domxref("HTMLInputElement")}}  interface which represents <input> elements in the DOM. Also available are those methods specified by the parent interfaces, {{domxref("HTMLElement")}} , {{domxref("Element")}} , {{domxref("Node")}} , and {{domxref("EventTarget")}} .

CSS

Inputs, being replaced elements, have a few features not applicable to non form elements. There are CSS selectors that can specifically target form controls based on their UI features, also known as UI pseudo-classes. The input element can also be targeted by type with attribute selectors. There are some properties that are especially useful as well.

UI pseudo-classes

Pseudo-classes relevant to the <input> element:
Pseudo-class Description
`{{Cssxref(":enabled")}}`  Any currently enabled element that can be activated (selected, clicked on, typed into, etc.) or accept focus and also has a disabled state, in which it can't be activated or accept focus.
`{{Cssxref(":disabled")}}`  Any currently disabled element that has an enabled state, meaning it otherwise could be activated (selected, clicked on, typed into, etc.) or accept focus were it not disabled.
`{{Cssxref(":read-only")}}`  Element not editable by the user
`{{Cssxref(":read-write")}}`  Element that is editable by the user.
`{{Cssxref(":placeholder-shown")}}`  Element that is currently displaying placeholder text, including <input> and `{{HTMLElement("textarea")}}`  elements with the placeholder attribute present that has, as yet, no value.
`{{Cssxref(":default")}}`  Form elements that are the default in a group of related elements. Matches `{{HTMLElement("input/checkbox", "checkbox")}}`  and `{{HTMLElement("input/radio", "radio")}}`  input types that were checked on page load or render.
`{{Cssxref(":checked")}}`  Matches `{{HTMLElement("input/checkbox", "checkbox")}}`  and `{{HTMLElement("input/radio", "radio")}}`  input types that are currently checked (and the (`{{HTMLElement("option")}}`  in a `{{HTMLElement("select")}}`  that is currently selected).
`{{Cssxref(":indeterminate")}}`  `{{HTMLElement("input/checkbox", "checkbox")}}`  elements whose indeterminate property is set to true by JavaScript, `{{HTMLElement("input/radio", "radio")}}`  elements, when all radio buttons with the same name value in the form are unchecked, and `{{HTMLElement("progress")}}`  elements in an indeterminate state
`{{Cssxref(":valid")}}`  Form controls that can have constraint validation applied and are currently valid.
`{{Cssxref(":invalid")}}`  Form controls that have constraint validation applied and are currently not valid. Matches a form control whose value doesn't match the constraints set on it by its attributes, such as required, pattern, step and max.
`{{Cssxref(":in-range")}}`  A non-empty input whose current value is within the range limits specified by the min and max attributes and the step.
`{{Cssxref(":out-of-range")}}`  A non-empty input whose current value is NOT within the range limits specified by the min and max attributes or does not adhere to the step constraint.
`{{Cssxref(":required")}}`  <input>, `{{HTMLElement("select")}}` , or `{{HTMLElement("textarea")}}`  element that has the required attribute set on it. Only matches elements that can be required. The attribute included on a non-requirable element will not make for a match.
`{{Cssxref(":optional")}}`  <input>, `{{HTMLElement("select")}}` , or `{{HTMLElement("textarea")}}`  element that does NOT have the required attribute set on it. Does not match elements that can't be required.
`{{Cssxref(":blank")}}`  <input> and `{{HTMLElement("textarea")}}`  elements that currently have no value.
`{{Cssxref(":user-invalid")}}`  Similar to :invalid, but is activated on blur. Matches invalid input but only after the user interaction, such as by focusing on the control, leaving the control, or attempting to submit the form containing the invalid control.
`{{Cssxref(":open")}}`  <input> elements that display a picker for the user to choose a value from (for example <input type="color">) — but only when the element is in the open state, that is, when the picker is displayed.

Pseudo-classes example

We can style a checkbox label based on whether the checkbox is checked or not. In this example, we are styling the {{cssxref('color')}}  and {{cssxref('font-weight')}}  of the {{htmlelement('label')}}  that comes immediately after a checked input. We haven’t applied any styles if the input is not checked.

<input id="checkboxInput" type="checkbox" />
<label for="checkboxInput">Toggle the checkbox on and off</label>
input:checked + label {
  color: red;
  font-weight: bold;
}

{{EmbedLiveSample('Pseudo-classes_example', 500, 80)}} 

Attribute selectors

It is possible to target different types of form controls based on their type using attribute selectors. CSS attribute selectors match elements based on either just the presence of an attribute or the value of a given attribute.

/* matches a password input */
input[type="password"] {
}

/* matches a form control whose valid values are limited to a range of values*/
input[min][max] {
}

/* matches a form control with a pattern attribute */
input[pattern] {
}

::placeholder

By default, the appearance of placeholder text is a translucent or light gray. The {{cssxref('::placeholder')}}  pseudo-element is the input’s placeholder text. It can be styled with a limited subset of CSS properties.

::placeholder {
  color: blue;
}

Only the subset of CSS properties that apply to the {{cssxref("::first-line")}}  pseudo-element can be used in a rule using ::placeholder in its selector.

appearance

The {{cssxref("appearance")}}  property enables the displaying of (almost) any element as a platform-native style based on the operating system’s theme as well as the removal of any platform-native styling with the none value.

You could make a <div> look like a radio button with div {appearance: radio;} or a radio look like a checkbox with [type="radio"] {appearance: checkbox;}, but don’t.

Setting appearance: none removes platform native borders, but not functionality.

caret-color

A property specific to text entry-related elements is the CSS {{cssxref("caret-color")}}  property, which lets you set the color used to draw the text input caret:

HTML

<label for="textInput">Note the red caret:</label>
<input id="textInput" class="custom" size="32" />

CSS

input.custom {
  caret-color: red;
  font:
    16px "Helvetica",
    "Arial",
    "sans-serif";
}

Result

{{EmbedLiveSample('caret-color', 500, 80)}} 

field-sizing

The {{cssxref("field-sizing")}}  property enables you to control the sizing behavior of form inputs (i.e. they are given a default preferred size by default.) This property enables you to override the default behavior, allowing form controls to adjust in size to fit their contents.

This property is typically used to create form fields that shrinkwrap their content and grow as more text is entered. This works with input types that accept direct text input (for example, text and url), input type file, and {{htmlelement("textarea")}}  elements.

object-position and object-fit

In certain cases (typically involving non-textual inputs and specialized interfaces), the <input> element is a replaced element. When it is, the position and size of the element’s size and positioning within its frame can be adjusted using the CSS {{cssxref("object-position")}}  and {{cssxref("object-fit")}}  properties.

Styling

For more information about adding color to elements in HTML, see:

Also see:

Additional features

Labels

Labels are needed to associate assistive text with an <input>. The {{HTMLElement("label")}}  element provides explanatory information about a form field that is always appropriate (aside from any layout concerns you have). It’s never a bad idea to use a <label> to explain what should be entered into an <input> or {{HTMLElement("textarea")}} .

Associated labels

The semantic pairing of <input> and <label> elements is useful for assistive technologies such as screen readers. By pairing them using the <label>'s for attribute, you bond the label to the input in a way that lets screen readers describe inputs to users more precisely.

It does not suffice to have plain text adjacent to the <input> element. Rather, usability and accessibility requires the inclusion of either implicit or explicit {{HTMLElement("label")}} :

<!-- inaccessible -->
<p>Enter your name: <input id="name" type="text" size="30" /></p>

<!-- implicit label -->
<p>
  <label>Enter your name: <input id="name" type="text" size="30" /></label>
</p>

<!-- explicit label -->
<p>
  <label for="name">Enter your name: </label>
  <input id="name" type="text" size="30" />
</p>

The first example is inaccessible: no relationship exists between the prompt and the <input> element.

In addition to an accessible name, the label provides a larger ‘hit’ area for mouse and touch screen users to click on or touch. By pairing a <label> with an <input>, clicking on either one will focus the <input>. If you use plain text to “label” your input, this won’t happen. Having the prompt part of the activation area for the input is helpful for people with motor control conditions.

As web developers, it’s important that we never assume that people will know all the things that we know. The diversity of people using the web—and by extension your website—practically guarantees that some of your site’s visitors will have some variation in thought processes and/or circumstances that leads them to interpret your forms very differently from you without clear and properly-presented labels.

Placeholders are not accessible

The placeholder attribute lets you specify text that appears within the <input> element’s content area itself when it is empty. The placeholder should never be required to understand your forms. It is not a label, and should not be used as a substitute, because it isn’t. The placeholder is used to provide a hint as to what an inputted value should look like, not an explanation or prompt.

Not only is the placeholder not accessible to screen readers, but once the user enters any text into the form control, or if the form control already has a value, the placeholder disappears. Browsers with automatic page translation features may skip over attributes when translating, meaning the placeholder may not get translated.

[!NOTE] Don’t use the placeholder attribute if you can avoid it. If you need to label an <input> element, use the {{HTMLElement("label")}}  element.

Client-side validation

[!WARNING] Client-side validation is useful, but it does not guarantee that the server will receive valid data. If the data must be in a specific format, always verify it also on the server-side, and return a 400 HTTP response if the format is invalid.

In addition to using CSS to style inputs based on the {{cssxref(":valid")}}  or {{cssxref(":invalid")}}  UI states based on the current state of each input, as noted in the UI pseudo-classes section above, the browser provides for client-side validation on (attempted) form submission. On form submission, if there is a form control that fails constraint validation, supporting browsers will display an error message on the first invalid form control; displaying a default message based on the error type, or a message set by you.

Some input types and other attributes place limits on what values are valid for a given input. For example, <input type="number" min="2" max="10" step="2"> means only the number 2, 4, 6, 8, or 10 are valid. Several errors could occur, including a rangeUnderflow error if the value is less than 2, rangeOverflow if greater than 10, stepMismatch if the value is a number between 2 and 10, but not an even integer (does not match the requirements of the step attribute), or typeMismatch if the value is not a number.

For the input types whose domain of possible values is periodic (that is, at the highest possible value, the values wrap back around to the beginning rather than ending), it’s possible for the values of the max and min properties to be reversed, which indicates that the range of permitted values starts at min, wraps around to the lowest possible value, then continues on until max is reached. This is particularly useful for dates and times, such as when you want to allow the range to be from 8 PM to 8 AM:

<input type="time" min="20:00" max="08:00" name="overnight" />

Specific attributes and their values can lead to a specific error {{domxref('ValidityState')}} :

Validity object errors depend on the <input> attributes and their values:
Attribute Relevant property Description
max `{{domxref('validityState.rangeOverflow')}}`  Occurs when the value is greater than the maximum value as defined by the max attribute
maxlength `{{domxref('validityState.tooLong')}}`  Occurs when the number of characters is greater than the number allowed by the maxlength property
min `{{domxref('validityState.rangeUnderflow')}}`  Occurs when the value is less than the minimum value as defined by the min attribute
minlength `{{domxref('validityState.tooShort')}}`  Occurs when the number of characters is less than the number required by the minlength property
pattern `{{domxref('validityState.patternMismatch')}}`  Occurs when a pattern attribute is included with a valid regular expression and the value does not match it.
required `{{domxref('validityState.valueMissing')}}`  Occurs when the required attribute is present but the value is null or radio or checkbox is not checked.
step `{{domxref('validityState.stepMismatch')}}`  The value doesn't match the step increment. Increment default is 1, so only integers are valid on type="number" is step is not included. step="any" will never throw this error.
type `{{domxref('validityState.typeMismatch')}}`  Occurs when the value is not of the correct type, for example an email does not contain an @ or a url doesn't contain a protocol.

If a form control doesn’t have the required attribute, no value, or an empty string, is not invalid. Even if the above attributes are present, with the exception of required, an empty string will not lead to an error.

We can set limits on what values we accept, and supporting browsers will natively validate these form values and alert the user if there is a mistake when the form is submitted.

In addition to the errors described in the table above, the validityState interface contains the badInput, valid, and customError boolean readonly properties. The validity object includes:

For each of these Boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element’s value obeys all constraints.

If there is an error, supporting browsers will both alert the user and prevent the form from being submitted. A word of caution: if a custom error is set to a truthy value (anything other than the empty string or null), the form will be prevented from being submitted. If there is no custom error message, and none of the other properties return true, valid will be true, and the form can be submitted.

function validate(input) {
  let validityState_object = input.validity;
  if (validityState_object.valueMissing) {
    input.setCustomValidity("A value is required");
  } else if (validityState_object.rangeUnderflow) {
    input.setCustomValidity("Your value is too low");
  } else if (validityState_object.rangeOverflow) {
    input.setCustomValidity("Your value is too high");
  } else {
    input.setCustomValidity("");
  }
}

The last line, setting the custom validity message to the empty string is vital. If the user makes an error, and the validity is set, it will fail to submit, even if all the values are valid, until the message is null.

Custom validation error example

If you want to present a custom error message when a field fails to validate, you need to use the Constraint Validation API available on <input> (and related) elements. Take the following form:

<form>
  <label for="name">Enter username (upper and lowercase letters): </label>
  <input type="text" name="name" id="name" required pattern="[A-Za-z]+" />
  <button>Submit</button>
</form>

The basic HTML form validation features will cause this to produce a default error message if you try to submit the form with either no valid filled in, or a value that does not match the pattern.

If you wanted to instead display custom error messages, you could use JavaScript like the following:

const nameInput = document.querySelector("input");

nameInput.addEventListener("input", () => {
  nameInput.setCustomValidity("");
  nameInput.checkValidity();
});

nameInput.addEventListener("invalid", () => {
  if (nameInput.value === "") {
    nameInput.setCustomValidity("Enter your username!");
  } else {
    nameInput.setCustomValidity(
      "Usernames can only contain upper and lowercase letters. Try again!",
    );
  }
});

The example renders like so:

{{EmbedLiveSample('Custom_validation_error_example')}} 

In brief:

[!NOTE] Always validate input constraints both client side and server side. Constraint validation doesn’t remove the need for validation on the server side. Invalid values can still be sent by older browsers or by bad actors.

[!NOTE] Firefox supported a proprietary error attribute — x-moz-errormessage — for many versions, which allowed you set custom error messages in a similar way. This has been removed as of version 66 (see Firefox bug 1513890).

Localization

The allowed inputs for certain <input> types depend on the locale. In some locales, 1,000.00 is a valid number, while in other locales the valid way to enter this number is 1.000,00.

Firefox uses the following heuristics to determine the locale to validate the user’s input (at least for type="number"):

Accessibility

Labels

When including inputs, it is an accessibility requirement to add labels alongside. This is needed so those who use assistive technologies can tell what the input is for. Also, clicking or touching a label gives focus to the label’s associated form control. This improves the accessibility and usability for sighted users, increases the area a user can click or touch to activate the form control. This is especially useful (and even needed) for radio buttons and checkboxes, which are tiny. For more information about labels in general see Labels.

The following is an example of how to associate the <label> with an <input> element in the above style. You need to give the <input> an id attribute. The <label> then needs a for attribute whose value is the same as the input’s id.

<label for="peas">Do you like peas?</label>
<input type="checkbox" name="peas" id="peas" />

Size

Interactive elements such as form input should provide an area large enough that it is easy to activate them. This helps a variety of people, including people with motor control issues and people using non-precise forms of input such as a stylus or fingers. A minimum interactive size of 44×44 CSS pixels is recommended.

Technical summary

Content categories Flow content, listed, submittable, resettable, form-associated element, phrasing content. If the type is not hidden, then labelable element, palpable content.
Permitted content None; it is a `{{Glossary("void element")}}` .
Tag omission Must have a start tag and must not have an end tag.
Permitted parents Any element that accepts phrasing content.
Implicit ARIA role
Permitted ARIA roles
DOM interface `{{domxref("HTMLInputElement")}}` 

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN