HTML5 Forms and Input Types Flashcards
6 cards from real HTML5 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 HTML5 Forms and Input Types flashcards as text
Which HTML5 input type is used to let users select a date from a date picker?
Answer: date
The input type='date' provides a native browser date picker control for selecting year, month, and day.
What does the 'required' attribute do on an HTML5 form input?
Answer: Prevents form submission if the field is empty
The required attribute specifies that an input field must be filled out before the form can be submitted.
Which HTML5 input type is designed for entering email addresses with built-in validation?
Answer: email
The input type='email' validates that the value contains an @ symbol and is formatted as a valid email address.
What is the purpose of the 'placeholder' attribute in HTML5 form inputs?
Answer: Displays hint text inside the field that disappears when the user types
The placeholder attribute shows a short hint describing the expected value inside the input field, which disappears when the user starts typing.
Which input type renders a slider control for selecting a numeric value within a range?
Answer: range
The input type='range' renders a slider control allowing the user to select a value between min and max attributes.
The 'autocomplete' attribute on an HTML5 form field controls:
Answer: Whether the browser can automatically fill in the field value
The autocomplete attribute tells the browser whether it may store and automatically fill in field values based on previously entered data.