Challenge - 5 Problems
Input Types Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the purpose of the
email input type?Which of the following best describes what the
email input type does in an HTML form?Attempts:
2 left
💡 Hint
Think about what makes an email input different from a normal text input.
✗ Incorrect
The
email input type helps browsers check if the entered text looks like an email address (with an @ and domain). It also can show a special keyboard on mobile devices.📝 Syntax
intermediate1:00remaining
Which input type will show dots instead of characters when typing?
You want to create a password field that hides the characters as the user types. Which input type should you use?
Attempts:
2 left
💡 Hint
Passwords should not be visible on screen.
✗ Incorrect
The
password input type masks the characters with dots or asterisks to keep the password private.❓ rendering
advanced1:30remaining
What happens when you use
type="number" in an input?Consider this HTML code:
What will the user see and be able to do in most modern browsers?
<input type="number" min="1" max="5" value="3">
What will the user see and be able to do in most modern browsers?
Attempts:
2 left
💡 Hint
Think about how number inputs help users pick numbers easily.
✗ Incorrect
The
number input shows a box where users can type numbers or use arrows to change the value within the set range.❓ accessibility
advanced2:00remaining
Which attribute improves accessibility for input fields?
You have an input field for email:
What should you add to make it accessible and clear for screen readers?
<input type="email">
What should you add to make it accessible and clear for screen readers?
Attempts:
2 left
💡 Hint
Labels help screen readers understand the input purpose.
✗ Incorrect
Using a
label or aria-label clearly tells assistive technology what the input is for, improving accessibility.❓ selector
expert1:30remaining
Which CSS selector targets only
input elements of type password?You want to style only password input fields with a red border. Which CSS selector will do this?
Attempts:
2 left
💡 Hint
Attribute selectors match elements by attribute and value.
✗ Incorrect
The selector
input[type=password] matches all input elements whose type attribute is exactly 'password'.