splitforms.com
guide · html elements

HTML Input Types — Complete Reference (2026)

HTML supports 22+ input types. Use the right type for each field — mobile keyboards adapt, native validation fires, accessibility tools announce correctly. Here's the complete reference with when to use each.

html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />

  <!-- Text inputs -->
  <label>Name<input name="name" type="text" required /></label>
  <label>Email<input name="email" type="email" required /></label>
  <label>Phone<input name="phone" type="tel" /></label>
  <label>Website<input name="url" type="url" /></label>
  <label>Password<input name="password" type="password" required minlength="8" /></label>

  <!-- Numeric -->
  <label>Age<input name="age" type="number" min="13" max="120" /></label>
  <label>Volume<input name="volume" type="range" min="0" max="100" /></label>

  <!-- Temporal -->
  <label>Birthday<input name="birthday" type="date" /></label>
  <label>Meeting time<input name="meeting" type="datetime-local" /></label>

  <!-- Misc -->
  <label>Favorite color<input name="color" type="color" /></label>
  <label>Profile pic<input name="photo" type="file" accept="image/*" /></label>

  <!-- Choice -->
  <label><input type="radio" name="plan" value="free" /> Free</label>
  <label><input type="radio" name="plan" value="pro" /> Pro</label>
  <label><input type="checkbox" name="agree" required /> I agree</label>

  <button type="submit">Submit</button>
</form>

HTML5 added a large set of input types beyond the basic text. Each type signals to the browser what kind of data is expected, which controls the mobile keyboard layout, native validation, and accessibility tool announcements. Picking the right type is one of the cheapest wins in form UX.

Text inputs: `text` (default), `email` (validates @ presence), `tel` (numeric mobile keyboard), `url` (validates URL format), `password` (masks input + password manager support). Use the most specific type — mobile users get the right keyboard, screen readers announce the field type, autofill works correctly.

Numeric inputs: `number` (numeric keyboard, validation against min/max/step), `range` (visual slider, returns a number). Temporal: `date` (native date picker, ISO format on submission), `time` (time picker), `datetime-local` (combined date+time), `month`, `week`. Each type uses the OS's native UI on mobile — no third-party date picker library required.

Choice inputs: `radio` (one-of-many), `checkbox` (zero-or-more, or single yes/no), `hidden` (invisible value carrier, e.g. access keys), `file` (file upload). Specialty: `color` (color picker), `search` (X clear button on iOS). Use `hidden` for splitforms's `access_key`, `_subject`, `redirect` fields.

How to set this up

Step 01

Pick the most specific type for each field

type=email for emails, type=tel for phones, type=number for numbers. Mobile keyboards adapt; native validation fires.

Step 02

Use temporal types instead of plain text dates

type=date opens the OS date picker; submits ISO format. No date-picker library needed.

Step 03

Use type=hidden for splitforms config

access_key, _subject, redirect — invisible inputs that carry submission metadata.

Step 04

Validate server-side anyway

HTML5 native validation runs in the browser only. splitforms validates submissions server-side and rejects malformed data.

22+ input types. Pick the most specific one for each field.

Frequently asked questions

What input types does HTML support?

text, email, tel, url, password, number, range, search, date, time, datetime-local, month, week, color, file, hidden, radio, checkbox, submit, reset, button, image. 22 types total in the HTML5 spec.

What's the difference between type=text and type=email?

type=email validates the field as a valid email format (browser blocks submission of malformed emails) and triggers the @-symbol-prominent mobile keyboard. type=text has no validation and uses the default mobile keyboard.

When should I use type=tel vs type=number for phone numbers?

type=tel for phone numbers. It opens the numeric keypad on mobile (no decimal point or 'e' that type=number includes) and signals phone-number intent to autofill systems. type=number is for actual numbers (counts, prices, ages).

Does type=date work in all browsers?

Yes — all modern browsers ship a native date picker for type=date. The submitted value is always ISO format (YYYY-MM-DD) regardless of the user's display locale. Older browsers (IE11) fall back to plain text input.

What's type=hidden for?

Invisible fields that carry metadata. splitforms uses them for access_key, _subject, redirect, and similar configuration that shouldn't be user-editable. The field is submitted with the form but not displayed in the UI.

Related guides

HTML forms

HTML Form — How to Build and Submit Forms in HTML

HTML elements

HTML Radio Button — Working Code and Common Patterns

HTML elements

HTML Button — Types, Attributes, and Common Patterns

HTML elements

HTML Textarea — Multi-Line Text Input Reference

HTML elements

HTML File Input — Upload Field Reference and Patterns

HTML elements

HTML Checkbox — Reference and Common Patterns

Ship the form, not the backend.

Free for 1,000 submissions/month. Email delivery, AI spam filtering, signed webhooks, real dashboard — all on the free plan. No credit card.

Get a free access key →