0
0
HTMLmarkup~5 mins

Input types (text, email, password, number) in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the type="text" attribute in an HTML input element?
It creates a single-line text box where users can enter any text. This is the most basic input type for general text input.
Click to reveal answer
beginner
How does type="email" improve user input compared to type="text"?
It helps browsers validate that the entered text looks like an email address (e.g., contains '@'). On mobile, it can show a keyboard optimized for email input.
Click to reveal answer
beginner
What does type="password" do in an input field?
It hides the characters typed by the user, showing dots or asterisks instead, to keep the password private on screen.
Click to reveal answer
beginner
What kind of data does type="number" accept, and how does it help users?
It accepts numeric input. Browsers often show up/down arrows to increase or decrease the number and show a numeric keypad on mobile devices.
Click to reveal answer
intermediate
Why is it important to use the correct input type for forms?
Using the right input type improves user experience by showing the right keyboard, enabling built-in validation, and making forms easier and safer to fill out.
Click to reveal answer
Which input type masks the characters typed by the user?
Aemail
Bpassword
Ctext
Dnumber
Which input type helps validate that the entered text is an email address?
Apassword
Btext
Cemail
Dnumber
What does type="number" input typically show on mobile devices?
ANumeric keypad
BEmoji keyboard
CAlphabet keyboard
DNo keyboard
Which input type is best for general text input without restrictions?
Anumber
Bemail
Cpassword
Dtext
Why should you use specific input types instead of just type="text"?
ATo improve user experience and validation
BTo make the form look colorful
CTo make the form load faster
DTo prevent users from typing
Explain the differences and uses of the input types: text, email, password, and number.
Think about how each input type helps users enter data correctly and easily.
You got /4 concepts.
    Describe why using the correct input type matters for accessibility and user experience.
    Consider how different users interact with forms on various devices.
    You got /4 concepts.