splitforms.com
HTML reference · 65 elements

HTML form elements, with live examples.

HTML form elements are the tags that build a form: <form> wraps the fields, <input>, <select> and <textarea> collect values, and <label>, <fieldset> and <button> name, group and submit them. Each page below has a live example you can edit in the browser, a copy-paste snippet, the attribute table and the common mistakes.

Browse the elements Form templates

All 65 HTML form elements

Form elements 14

The tags that build a form: form, input, select, textarea, label, button and friends.

HTML Form

The container that collects fields and sends them to its action URL with GET or POST.

Read & copy

HTML Input

One form field; its type (text, email, number, file and more) sets what it accepts and sends.

Read & copy

HTML Textarea

A multi-line text field for messages and comments, sized with rows and cols.

Read & copy

HTML Select (Dropdown)

A dropdown list built from option tags that submits the chosen option's value.

Read & copy

HTML Button

Submits the form, resets it or runs a script, depending on its type attribute.

Read & copy

HTML Label

Names a form field; its for attribute matches the field's id so a click focuses it.

Read & copy

HTML Fieldset & Legend

Groups related controls under a legend caption; disabled on it disables them all.

Read & copy

HTML datalist

A list of suggested values for an input, linked through the input's list attribute.

Read & copy

HTML output Element

Shows a live result from a calculation or another control, such as a range slider.

Read & copy

HTML Optgroup

Groups related <option> elements under a non-selectable label inside a <select>.

Read & copy

HTML Progress Bar

Shows how far a task has got: value out of max, or an indeterminate busy bar when value is left out.

Read & copy

HTML Meter Element

A gauge for a measurement in a known range, such as disk usage, a score or password strength, coloured by low/high/optimum.

Read & copy

HTML Legend Element

The caption of a <fieldset>: it must be the first child and names the whole radio or checkbox group for screen readers.

Read & copy

HTML Dialog Element

A native modal or popup box. With <form method="dialog"> inside, submitting closes it and sets returnValue instead of sending a request.

Read & copy

Input types 22

Every type value for <input>, from text and email to date, range and file.

HTML Radio Button

Pick exactly one option; radios that share a name form one group.

Read & copy

HTML File Input (Upload)

Lets people choose files to upload; needs POST and multipart/form-data.

Read & copy

HTML Checkbox

An on/off box that sends name=value only when it is checked.

Read & copy

HTML Date Input

A native date picker that always submits the date as yyyy-mm-dd.

Read & copy

HTML Email Input

A text field the browser checks for one @ and a valid domain shape before submit.

Read & copy

HTML Input Type Tel

A phone number field that opens the phone keypad on mobile but doesn't check the format.

Read & copy

HTML Input Type Number

A field for amounts and counts that blocks non-numbers and checks min, max and step.

Read & copy

HTML Input Type URL

A website field that opens the URL keyboard on mobile and only accepts absolute URLs.

Read & copy

HTML Input Type Hidden

An input the visitor never sees that still sends its name and value with the form.

Read & copy

HTML Input Type Password

A text field that hides what is typed; the value is still sent as plain text.

Read & copy

HTML Input Type Range

A slider input for picking a number within a range.

Read & copy

HTML Input Type Time

A time picker input that submits the time as HH:MM in 24-hour format.

Read & copy

HTML Input Type Search

A text field for search queries, with a clear button and a search key on mobile keyboards.

Read & copy

HTML input type=color

A native color picker that always submits a 7-character lowercase hex value like #ff6600.

Read & copy

HTML input type=datetime-local

A date and time picker that submits a local wall-clock time with no time zone.

Read & copy

HTML input type=month

A picker for a year and month that submits the value as YYYY-MM.

Read & copy

HTML input type=week

A picker for an ISO week that submits the value as YYYY-Www, such as 2026-W45.

Read & copy

HTML Input Type Submit

A void submit control whose value attribute is the button label; only the clicked input sends its name=value pair.

Read & copy

<input type="text">

A single-line text field for free-form input such as a person's name.

Read & copy

<input type="reset">

A button that restores every control in its form to the default value written in the HTML, not to blank.

Read & copy

<input type="button">

A plain clickable button that does nothing until JavaScript runs; it never submits or resets the form and its value is not sent.

Read & copy

HTML Input Type Image

A graphical submit control: src and alt are required; a click sends name.x and name.y coordinates instead of a name=value label.

Read & copy

Attributes 29

The attributes that control validation, submission and the keyboard.

HTML Required Attribute

Makes a field mandatory: the browser blocks the submit until it has a value.

Read & copy

HTML Pattern Attribute

A regular expression the whole value of a text-like input must match before submit.

Read & copy

HTML Autocomplete Attribute

Tells the browser which saved value (name, email, address, one-time code) fits a field.

Read & copy

HTML Form Method (GET vs POST)

GET puts the form data in the URL; POST sends it in the request body.

Read & copy

HTML Form Enctype Attribute

How a POST form encodes its data: urlencoded (default), multipart/form-data for files, or text/plain.

Read & copy

HTML novalidate Attribute

Turn off the browser's built-in form checks for a whole form, or for one submit button with formnovalidate.

Read & copy

HTML Placeholder Attribute

Hint text shown inside an empty field; it is not a label and is never submitted.

Read & copy

HTML maxlength & minlength

Limit how many characters a text input or textarea accepts, and require a minimum.

Read & copy

HTML multiple attribute

Let a file input, select or email input take more than one value.

Read & copy

HTML name attribute

The key each field is submitted under; a field without a name is never sent.

Read & copy

HTML readonly & disabled

readonly locks a field but still submits it; disabled locks it and leaves it out.

Read & copy

HTML Form target

Where the form's response opens: same tab, new tab, or a named iframe.

Read & copy

HTML form attribute

Ties a control outside the <form> to it by id, so its value is still submitted.

Read & copy

HTML value attribute

Sets a control's starting value and, for checkboxes, radios, options and buttons, what gets submitted.

Read & copy

HTML Disabled Attribute

A boolean attribute that turns a form control off and leaves it out of the submission.

Read & copy

HTML minlength attribute

Set the fewest characters a text input or textarea must have before the form can submit.

Read & copy

HTML formaction attribute

Send one form to a different URL, method or validation mode depending on which submit button is clicked.

Read & copy

HTML inputmode attribute

Choose which on-screen keyboard a phone shows for a field, without changing how the field validates.

Read & copy

HTML min and max attributes

Set the lowest and highest allowed value for number, range, date, time, month and week inputs.

Read & copy

HTML step attribute

Set which values a number, range, date or time input accepts, counted in steps from min.

Read & copy

HTML accept Attribute

Tells a file input which file types to show in the picker, by MIME type or extension.

Read & copy

HTML spellcheck Attribute

Turn browser spell check on or off for textareas, inputs, and editable content.

Read & copy

HTML autofocus Attribute

Focus an input automatically when a page or dialog opens.

Read & copy

HTML enterkeyhint Attribute

Set the label of the Enter key on mobile keyboards.

Read & copy

HTML checked attribute

A boolean attribute that sets a checkbox or radio button's default checked state.

Read & copy

HTML selected attribute

A boolean attribute on an option that makes it the default choice when the select loads.

Read & copy

HTML size attribute

Sets the visible character width of a text input or the visible rows in a select listbox.

Read & copy

HTML title attribute

Provides advisory text that browsers may show as a tooltip or pattern validation hint.

Read & copy

HTML autocapitalize Attribute

Hint whether a mobile keyboard should auto-capitalize letters as the visitor types.

Read & copy

Looking for a ready-made form? See the form templates or the free HTML drop-in.

Free backend

Ship a working form in under a minute.

Grab a free access key, paste one endpoint into any element above, and start collecting submissions — 500 free to start, spam-filtered, no server code.

Get free access key Browse templates