Skip to content
Aabha AI Academy
Skip to reading

HTML/CSS · Module 3

Answers and explanations · Build a form people can understand

Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.

Compare the reasoning, not just the final appearance. Other correct solutions can satisfy the same requirements.

1. Associated label

<label for="visitor-email">Invented email (required)</label>
<input id="visitor-email" type="email" required>

The matching strings create the association. Renaming the input would also work if every reference, including descriptions or future scripts, were updated. A label merely placed nearby is not enough.

2. What validation shows

With required present, empty is invalid. “not-an-email” does not satisfy the email control’s format requirement. alex@example.com is a suitable synthetic format example. None of these checks verifies delivery, identity, consent, or a reservation. Record browser-specific wording rather than claiming every browser displays the same message.

3. Static boundary

Omitting name prevents these control values from contributing to the submitted form data. The action opens an explanatory static page and no event organizer receives a booking. POST only changes the request method; a server still has to implement processing. The page’s honest labels matter as much as whether the button is clickable.

Return to practice · Return to lesson

Return to this module