staticdata.dev
Menu
Datasets About Contact

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.

v1.0.0 MIT 22 records Updated 2026-10-05 stable Source:  WHATWG HTML Living Standard — The input element, MDN Web Docs — input element

Quick fetch

Stable URL. CORS-enabled. No auth.

bash
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

    Open

    min: 6.2 KB · /v1/input-types.min.json

  • CSV 4.9 KB

    /v1/input-types.csv

    Open
  • TypeScript 8.6 KB

    /v1/input-types.ts

    export const inputTypes

    type InputType = (typeof inputTypes)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
Field Type Description Example
type string The value of the type attribute (e.g. text, email, checkbox) email
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.

Data preview
typedescription
buttonA push button with no default behavior, displaying the value of the value attribute as its label.
checkboxA check box that allows selecting or deselecting a single value. Use multiple checkboxes for selecting multiple values.
colorA 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).
dateA 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-localA control for entering a date and time (year, month, day, hour, and minute) with no timezone information.
emailA field for editing an email address. Validates that the input is a properly-formatted email address before form submission.
fileA control that lets the user select one or more files from device storage. Use the accept attribute to restrict the types of files.
hiddenA 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.
imageA graphical submit button. Displays an image defined by the src attribute. Clicking submits the form and appends the click coordinates to the form data.
monthA control for entering a month and year, with no timezone. Allows the user to enter a month and year in the form YYYY-MM.

Showing 10 of 22. View full data:  JSON · CSV

Fetch examples

Drop-in snippets in five languages.

curl
curl -sSL https://staticdata.dev/v1/input-types.json | jq '.[0]'
JavaScript
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]);
Python
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])
Go
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])
}
Rust
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