What is the purpose of the ‘form’ tag?

The <form> tag collects user input. It can have various controls like text fields, checkboxes, and submit buttons.

Example:

<form action="/submit" method="post">
  <input type="text" name="username">
  <button type="submit">Submit</button>
</form>