Starlit Daily

📚 › HTML: build the structure of a web page

11. Forms: inputs and labels

Este artículo se traducirá automáticamente. Por ahora se muestra en inglés.

A form collects information. input elements receive text and their type decides what kind: text, email, number, password or date. A label connects text to its field, so clicking the label focuses the field.

Form fields should always have a label.

Ver ejemplo

<form>
  <label for="name">Name</label>
  <input id="name" type="text">
</form>

✍️ Ahora te toca

Build a form with a label Email for an input of type email with id email.

← Volver al curso