01 / 17

What are different form elements in HTML ?

HTML forms are used to collect user input. A form contains different types of form elements, each serving a specific purpose to capture data like text, numbers, options, or files.

Common Form Elements
  1. 1

    <form> – Defines the form container.

  2. 2

    <input> – Used for text fields, checkboxes, radio buttons, passwords, etc.

  3. 3

    <label> – Defines a label for input elements.

  4. 4

    <textarea> – For multi-line text input.

  5. 5

    <button> – Defines a clickable button.

  6. 6

    <select> and <option> – Dropdown list of options.

  7. 7

    <fieldset> and <legend> – Group related form elements with a caption.

  8. 8

    <datalist> – Provides an autocomplete list of options for an input.

  9. 9

    <output> – Displays the result of a calculation.

  10. 10

    <meter> and <progress> – Represent measurements and progress status.

Example of a Simple Form