0
0
HTMLmarkup~10 mins

Input types (text, email, password, number) in HTML - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a text input field for a user's name.

HTML
<label for="name">Name:</label>
<input id="name" type="[1]" name="name">
Drag options to blanks, or click blank then click option'
Aemail
Bnumber
Cpassword
Dtext
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'email' type for name input, which expects an email format.
Using 'password' type which hides the input characters.
2fill in blank
medium

Complete the code to create an input field that only accepts email addresses.

HTML
<label for="user-email">Email:</label>
<input id="user-email" type="[1]" name="email">
Drag options to blanks, or click blank then click option'
Aemail
Bpassword
Ctext
Dnumber
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'text' type which does not validate email format.
Using 'password' type which hides the input.
3fill in blank
hard

Fix the error in the code to create a password input field that hides the typed characters.

HTML
<label for="pass">Password:</label>
<input id="pass" type="[1]" name="password">
Drag options to blanks, or click blank then click option'
Apassword
Bemail
Ctext
Dnumber
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'text' type which shows the password openly.
Using 'email' or 'number' types which are not suitable for passwords.
4fill in blank
hard

Fill both blanks to create a number input field with a minimum value of 1.

HTML
<label for="age">Age:</label>
<input id="age" type="[1]" name="age" min="[2]">
Drag options to blanks, or click blank then click option'
Anumber
B1
Cemail
Dpassword
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'text' type which allows any characters.
Not setting the minimum value correctly.
5fill in blank
hard

Fill all three blanks to create an email input with a placeholder and required attribute.

HTML
<label for="contact">Contact Email:</label>
<input id="contact" type="[1]" name="contact" placeholder="[2]" [3]>
Drag options to blanks, or click blank then click option'
Atext
Bemail
Crequired
Dpassword
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'text' type instead of 'email'.
Forgetting to add the 'required' attribute.