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” value=” Enter your given name” />
B.
<input name =”GivenName” default=” Enter your given name” />
C.
<input name=”GivenName” text=” Enter your given name” />
D.
<input name=”GivenName” placeholder=” Enter your given name” />
Explanation:
The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample
value or a 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.
HTML <input> placeholder Attribute