Project: Style the Form and Check the Site

Your application form now rejects values Rosa can’t use, marks its required fields in words, and tells applicants that nothing is sent yet. It sits in apply.html. You tested its HTML in the exercises without viewing the page.

You’ll make the form match the rest of the site and then audit every page, including the two new ones, before Rosa shares the link. This step teaches nothing new. You’re checking your own work against screenshots and a checklist, the way you’d check a site for a real client. Start by opening apply.html in the live preview.

Style the Form to Match the Site

Most of the form is styled already. The rules you wrote for the sign-up form select form p > input, form p > select, and form p > textarea, so they match every form on the site. Your fields have the site’s font, labels above them, green borders, the blue focus outline, and a red border once a value is wrong.

They don’t have error messages yet because the exercises added none. A red border alone relies on color. Add them as you did for the sign-up form: a <span> with the class error-message right after each checked input, tied to it with aria-describedby. Here’s Email:

Language: HTML
<input id="email" name="email" type="email"
  autocomplete="email" required
  aria-describedby="email-error">
<span id="email-error" class="error-message">Enter
  an email address, like [email protected].</span>

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.