STEP 1 · LEARNHow it works
A label identifies a control, while correct types help validation.
<form>
<label for="email">Email</label>
<input id="email" name="email" type="email" required>
<button type="submit">Send</button>
</form>
for and id connect the label to the input. type email enables email validation, and required makes the field mandatory.
<input placeholder="Email">
A placeholder disappears when the user types and does not replace a persistent connected label.
STEP 2 · APPLYYour exercise
Add required name and email fields, connected labels and a submit button.
index.htmlHTML
STEP 4 · CHECK
What needs to pass
0%not checked
- ○There is a form.
- ○The name field has name and required.
- ○Email has type, name and required.
- ○Every input has a connected label.
- ○There is a type="submit" button.
Explain the solution logic+
For each control, check the label for and input id pair, then add name, the correct type and required.