HTML · Exercise 5 of 5 Previous
Intermediate
A sign-up form with real validation
Finish this sign-up form. username: required, 3 to 15 characters, lowercase letters and digits only, autofill token username. email: a required email input.
password: a required password input of at least 8 characters with the token that lets browsers suggest a strong password, and a visible hint ("At least 8 characters") linked with aria-describedby.
confirm: in the JavaScript tab, use setCustomValidity so this field is invalid whenever it doesn't match the password, and valid again when it does. The button should say Create account.
What Check tests
usernameis required, 3–15 characters, lowercase letters and digits onlyusernameandemailhave autofill tokens andemailis a required email inputpasswordis a required password input, 8+ characters, withnew-password- The password hint is linked with
aria-describedby - Different passwords make
confirminvalid - Matching passwords make
confirmvalid again - The button submits and says Create account
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.