What is the use of the "placeholder" attribute in input elements?
- It displays a default value that gets submitted with the form.
- It presents a hint or instructional text inside the input field.
- It provides a tooltip when hovering over the input.
- It sets the background color of the input.
The "placeholder" attribute provides a short hint or illustrative example for the expected input. This hint is displayed inside the input field before the user enters a value and disappears when the user starts typing. It's used to guide users on what they should input.
Loading...
Related Quiz
- The ______ attribute is crucial to specify the destination URL in the anchor tag.
- How can ARIA roles enhance the accessibility of form elements, particularly select lists?
- How does utilizing the "for" attribute in the label element enhance accessibility in forms?
- HTML comments can be used to _____ sections of code for testing purposes.
- How can a developer ensure that the table caption is visually hidden but accessible to screen readers?