Back to Concepts

<form>

A section for user input.

The `<form>` tag is used to create an HTML form for user input. The `<form>` element can contain one or more of the following form elements: `<input>`, `<textarea>`, `<button>`, `<select>`, `<option>`, `<optgroup>`, `<fieldset>`, `<label>`, `<output>`.

In The Wild

Seen in: Netflix

Login Box

The entire box asking for your Email and Password is a <form>. It handles sending that data to the server.

📱

Live Example & Code

Preview Output
<form action="/submit">
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname"><br>
  <input type="submit" value="Submit">
</form>
HTMLViz
© 2026 HTMLViz. Open Source Learning.