Module input

Module input 

Source
Expand description

Attribute names for input (<input>) elements.

§Purpose

The <input> element creates interactive form controls for collecting user data. It supports numerous input types from text to files, with extensive validation and constraint capabilities.

§Common Attributes

  • type: Input control type (text, email, password, etc.)
  • name: Form control name for submission
  • value: Current value of the control
  • placeholder: Hint text displayed when empty
  • required: Boolean indicating required field
  • pattern: Regular expression for validation
  • min/max: Range constraints for numeric/date inputs

§Example

<input type="text" name="username" placeholder="Enter username" required>
<input type="email" name="email" autocomplete="email">
<input type="password" name="pass" minlength="8" autocomplete="current-password">
<input type="number" name="age" min="0" max="120" step="1">
<input type="file" name="upload" accept="image/*" multiple>

§WHATWG Specification

Constants§

ACCEPT
The accept attribute.
AUTOCOMPLETE
The autocomplete attribute.
AUTOFOCUS
The autofocus attribute.
CHECKED
The checked attribute.
DISABLED
The disabled attribute.
FORM
The form attribute.
LIST
The list attribute.
MAX
The max attribute.
MAXLENGTH
The maxlength attribute.
MIN
The min attribute.
MINLENGTH
The minlength attribute.
MULTIPLE
The multiple attribute.
NAME
The name attribute.
PATTERN
The pattern attribute.
PLACEHOLDER
The placeholder attribute.
READONLY
The readonly attribute.
REQUIRED
The required attribute.
SIZE
The size attribute.
STEP
The step attribute.
TYPE
The type attribute.
VALUE
The value attribute.