Form

<form> element

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

The form element can contain one or more of the following elements:

  • <input>
  • <textarea>
  • <button>
  • <select>
  • <option>
  • <optgroup>
  • <fieldset>
  • <label>
  • <output>

Example:

<form action="" method="get" class="demo-form">
  <div>
    <label for="uname">Username:</label>
    <input type="text" id="uname" name="username">
  </div>
  <div>
    <label for="pword">Password:</label>
    <input type="password" id="pword" name="password">
  </div>
  <button type="submit">Submit</button>
</form>

Read more at MDN Web Docs: Form element