HTML elements: All 14 form elements

HTML 4.01 form elements

1. <button>

The <button> element is an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology. Once activated, it then performs an action, such as submitting a form or opening a dialog.

2. <fieldset>

The <fieldset> element is used to group several controls as well as labels within a form.

Fieldset legend

3. <form>

The <form> element represents a document section containing interactive controls for submitting information.

This an empty form

4. <input>

The <input> element is used to create interactive controls for web-based forms in order to accept data from the user.

5. <label>

The <label> element represents a caption for an item in a user interface.

6. <legend>

The <legend> element represents a caption for the content of its parent <fieldset>.

Legend text

7. <optgroup>

The <optgroup> HTML element creates a grouping of options within a <select> element.

8. <option>

The <option> element is used to define an item contained in a <select>, an <optgroup>, or a <datalist> element.

9. <select>

The <select> element represents a control that provides a menu of options.

10. <textarea>

The <textarea> element represents a multi-line plain-text editing control.

HTML 5 form elements

11. <datalist>

The <datalist> element contains a set of <option> elements that represent the permissible or recommended options available to choose from within other controls.

12. <meter>

The <meter> element represents either a scalar value within a known range or a fractional value.

at 50/100

13. <output>

The <output> element is a container element into which a site or app can inject the results of a calculation or the outcome of a user action.

60

14. <progress>

The <progress> element displays an indicator showing the completion progress of a task, typically displayed as a progress bar.

70%

The <keygen>

The <keygen> element was dropped in 2015. This element was used to specify a key pair generator field used for forms. When the form is submitted, the private key is stored locally, and the public key is sent to the server.