Starlit Daily

📚 › HTML: build the structure of a web page

11. Forms: inputs and labels

ستتم ترجمة هذا المقال تلقائيًا. يُعرض بالإنجليزية حاليًا.

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.

عرض المثال

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

✍️ دورك الآن

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

← العودة إلى الدورة