WEB-DEVELOPMENT-APPLICATIONS practice question 2 of 25
Which attribute displays help text in an input field without specifying an actual value for the input?
Choose your answer, then check it against the explanation and the full breakdown below.
Question breakdown
Key idea: The placeholder attribute shows hint text inside an empty input without setting the input's value.
How to reach the answer
- The clue is that the help text appears in the field but is not an actual value.
- The value attribute would set real data, so that is not what is wanted.
- The for attribute belongs to label, and name identifies the field when the form is submitted.
- placeholder displays the hint and is never submitted with the form.
Each option
Common trap: Thinking that some 'default' attribute supplies initial text, which confuses visible hint text with a real value.
In practice: Placeholders show the expected format, such as 'name@example.com'. They should support a proper label, not replace it, for accessibility reasons.
Remember: placeholder is a visual hint; value is the actual data.
Drafted with AI assistance and checked against the answer key.
Keep practicing
Take the free WEB-DEVELOPMENT-APPLICATIONS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other WEB-DEVELOPMENT-APPLICATIONS practice questions
- Question 1Given the following JavaScript code: ```javascript var n1 = 10; var n2 = "20.39"; ``` Whi…
- Question 4Which element attaches an external CSS document to a web page?
- Question 5Which HTML tag should a developer use to create a drop-down list?
- Question 6Which method allows the end user to enter text as an answer to a question as the page loa…
- Question 8Which layout design is easiest to manage on a variety of devices?
- Question 9Which structure tag should a developer use to place contact information on a web page?
