ArtOfCode.org
Toggle Menu
Home
Online Rust Compiler
Tutorials
Algorithms 101
Html Css Tutorial
Javascript Tutorial
Blog
All Posts
HTML Forms and Validation
Assess inputs constraints and attributes.
1. Which input type is used for a password field where the input is masked?
text
password
hidden
secure
2. Which of the following are HTML5 input types that include built-in validation?
email
text
url
number
3. The 'required' attribute in HTML5 will prevent form submission if the field is empty.
True
False
4. What attribute is used to specify the minimum value for a number input?
5. Which HTML element is used to create a multi-line text input field?
<input type='text'>
<textarea>
<input type='multitext'>
<textinput>
6. Which attributes can be used to validate the length of text input?
minlength
maxlength
size
length
7. The 'method' attribute of a form can only be set to 'GET' or 'POST'.
True
False
8. What attribute associates a <label> element with an input (abbreviation)?
9. Which form submission method sends data in the request body?
GET
POST
PUT
SEND
10. Which of the following are valid for selecting predefined options?
radio
checkbox
select
datalist
11. Client-side HTML5 validation is sufficient to secure form data.
True
False
12. What attribute provides a short hint in an input field?
hint
placeholder
tooltip
help
13. Name the HTML element used to group related form controls.
14. Which input type creates a slider control for numeric values?
range
slider
scale
level
15. Which validation attributes work with 'number' input types?
min
max
step
pattern
16. What is the default form submission method?
GET
POST
PUT
SEND
17. type='email' input automatically validates for an '@' symbol.
True
False
18. Attribute for encoding form data before submission (abbrev.)
19. Which input type allows multiple selections from options?
radio
select
checkbox
list
20. Benefits of using <label> elements with inputs:
Improves accessibility
Increases clickable area
Automatically submits form
Links input to form data
Reset
Answered 0 of 0 — 0 correct