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 submissionvalue: Current value of the controlplaceholder: Hint text displayed when emptyrequired: Boolean indicating required fieldpattern: Regular expression for validationmin/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
acceptattribute. - AUTOCOMPLETE
- The
autocompleteattribute. - AUTOFOCUS
- The
autofocusattribute. - CHECKED
- The
checkedattribute. - DISABLED
- The
disabledattribute. - FORM
- The
formattribute. - LIST
- The
listattribute. - MAX
- The
maxattribute. - MAXLENGTH
- The
maxlengthattribute. - MIN
- The
minattribute. - MINLENGTH
- The
minlengthattribute. - MULTIPLE
- The
multipleattribute. - NAME
- The
nameattribute. - PATTERN
- The
patternattribute. - PLACEHOLDER
- The
placeholderattribute. - READONLY
- The
readonlyattribute. - REQUIRED
- The
requiredattribute. - SIZE
- The
sizeattribute. - STEP
- The
stepattribute. - TYPE
- The
typeattribute. - VALUE
- The
valueattribute.