HTML Input Types
A complete reference of every valid value for the HTML `<input>` element's `type` attribute, drawn from the WHATWG HTML Living Standard and the MDN Web Docs input element reference. Each record includes the type value, a concise description of its purpose and behavior, and the list of HTML attributes that are relevant or meaningful for that type.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/input-types.json
Or use as a typed import:
import { inputTypes } from "https://staticdata.dev/v1/input-types.ts"
Formats
- JSON 8.4 KB
/v1/input-types.json
min: 6.2 KB · /v1/input-types.min.json
- CSV 4.9 KB
/v1/input-types.csv
- TypeScript 8.6 KB
/v1/input-types.ts
export const inputTypes
type InputType = (typeof inputTypes)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| type | string | The value of the type attribute (e.g. text, email, checkbox) | |
| description | string | Short description of the input type's purpose and behavior | A field for editing an email address. |
| attributes | string[] | HTML attributes that are relevant or applicable to this input type | ["value","placeholder","required","maxlength"] |
Preview
First 10 records.
| type | description |
|---|---|
| button | A push button with no default behavior, displaying the value of the value attribute as its label. |
| checkbox | A check box that allows selecting or deselecting a single value. Use multiple checkboxes for selecting multiple values. |
| color | A control for specifying a color via a color-picker widget. By default the value is a lowercase hex color string in #rrggbb format; the newer alpha and colorspace attributes allow alpha and display-p3 values (CSS color syntax). |
| date | A control for entering a date (year, month, and day) with no time component. Opens a date picker or numeric wheels for year, month, and day. |
| datetime-local | A control for entering a date and time (year, month, day, hour, and minute) with no timezone information. |
| A field for editing an email address. Validates that the input is a properly-formatted email address before form submission. | |
| file | A control that lets the user select one or more files from device storage. Use the accept attribute to restrict the types of files. |
| hidden | A control that is not displayed but whose value is submitted with the form. Useful for passing data that should not be edited by the user. |
| image | A graphical submit button. Displays an image defined by the src attribute. Clicking submits the form and appends the click coordinates to the form data. |
| month | A control for entering a month and year, with no timezone. Allows the user to enter a month and year in the form YYYY-MM. |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/input-types.json | jq '.[0]' import type { InputType } from "https://staticdata.dev/v1/input-types.ts";
const res = await fetch("https://staticdata.dev/v1/input-types.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const inputTypes: InputType[] = await res.json();
console.log(inputTypes[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/input-types.min.json") as r:
inputTypes = json.load(r)
print(inputTypes[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/input-types.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/input-types.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
This dataset covers all 22 input types defined in the WHATWG HTML Living Standard as of October 2026. The type attribute of <input> determines the control rendered by the browser, its validation behavior, and which additional attributes apply. Types range from simple text fields (text, password, search, tel, url, email) and date/time pickers (date, datetime-local, month, week, time) to numeric controls (number, range), selection controls (checkbox, radio), file upload (file), color picking (color), and form action buttons (submit, reset, button, image). The hidden type transmits data without rendering any visible control.
The attributes field for each record lists the HTML attributes that are meaningful for that particular input type according to the HTML specification. Attributes such as value, name, disabled, and form apply broadly, while type-specific attributes like accept (file), checked (checkbox, radio), min/max/step (numeric and date types), multiple (email, file), src/alt (image), and pattern (text-like types) are listed only for the types where they have a defined effect. Attributes listed in the spec as “applicable” but having no effect are excluded for clarity.
Records are sorted alphabetically by type name for easy lookup. The dataset omits browser-vendor-specific proprietary input types that are not part of the HTML Living Standard.
The attributes lists follow the “type attribute summary” table of the HTML Living Standard (as of October 2026), plus the attributes common to every input such as value, name, form and disabled (and capture from HTML Media Capture for file). IDL-only properties such as indeterminate are not included.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
input-types changelog for this dataset's history.
Related datasets
More Web datasets
- aria-attributes
- character-encodings
- csp-directives
- credit-card-types
- dns-record-types
- dom-events
- emoji
- emoji-shortcodes
- html-entities
- html-attributes
- http-auth-schemes
- http-cache-directives
- http-content-codings
- http-headers
- http-methods
- http-status-codes
- http-versions
- iframe-sandbox-tokens
- ip-protocol-numbers
- keyboard-event-codes
- link-relations
- media-type-suffixes
- mime-types
- oauth-grant-types
- ports
- referrer-policies
- ip-special-blocks
- svg-elements
- tcp-flags
- tlds
- tls-cipher-suites
- tls-versions
- uri-schemes
- well-known-uris