Skip to content
All references

HTML reference

HTML Input Types

Choose native form inputs and understand which validation still belongs on the server.

9 of 9 entries

Text

text and search

<label for="q">Search</label>
<input id="q" type="search" name="q">

Provide a visible label. Search is a text control with search-oriented browser behavior.

Text

email and url

<input type="email" name="email" required>
<input type="url" name="website">

Native syntax checks improve usability but do not establish ownership or safety.

Text

tel

<input type="tel" name="phone" autocomplete="tel">

A telephone input does not enforce one universal phone-number format.

Numeric

number

<input type="number" min="1" max="100" step="1">

Use numeric controls for quantities, not identifiers such as phone numbers or postal codes.

Numeric

range

<input type="range" min="0" max="100" step="5">

Suitable for approximate selection; expose the selected value and label.

Time

date and datetime-local

<input type="date">
<input type="datetime-local">

datetime-local contains a local date and time, with no time-zone identifier.

Choice

checkbox and radio

<input type="checkbox" name="updates">
<input type="radio" name="size" value="small">

Checkboxes represent independent choices; radios sharing a name form one choice group.

Files

file

<input type="file" accept="image/png,image/jpeg">

accept guides the picker; validate type, size and content independently.

Text

password

<input type="password" autocomplete="new-password">

Masking is a display feature; transport and storage need separate protection.