You develop a webpage with a standard input control by using HTML5.
The input control must display the text Enter your given name, as shown below:
When a user selects the input control, the text must disappear.
You need to create the input control.
Which input control should you use?
A. < input name=”-GivenName-” type=”text” value=”-” />
B. <input name=”-GivenName-” type=”text” />
C. <input name=”-GivenName-” type=”text” />
D. <input name=”-GivenName-” type=”text” placeholder=”-” />
Explanation:
The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value ora short description of the expected format).
The short hint is displayed in the input field before the user enters a value.
The placeholder attribute works with the following input types: text, search, url, tel, email, and password.
Reference: HTML <input> placeholder Attribute