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 should be used to allow users to pick a color via a color picker?
Answer: color
The input type='color' renders a native color picker control that returns a hex color value.
What is the purpose of the 'step' attribute on an HTML5 number input?
Answer: Defines the legal number intervals between values
The step attribute specifies the legal number intervals for the input value, so a step='5' means only multiples of 5 are valid.
The 'formaction' attribute on a submit button in HTML5 allows you to:
Answer: Override the form's action URL for that specific button
The formaction attribute on a submit button specifies the URL to which the form data is sent, overriding the parent action attribute.
Which attribute on an input makes it readable but not editable by the user?
Answer: readonly
The readonly attribute prevents the user from modifying the input's value while still allowing the value to be submitted with the form.
What does the 'multiple' attribute enable on a file input?
Answer: Allows the user to select more than one file
The multiple attribute on a file input allows users to select more than one file at a time from the file picker dialog.
Which HTML5 input type creates a field that masks characters, suitable for passwords?
Answer: password
The input type='password' masks the characters as the user types, hiding sensitive information like passwords from view.