EN
HTML - display input element's placeholder text
0
points
In this article, we would like to show you how to display the input element's placeholder text in HTML.
Quick solution:
// ONLINE-RUNNER:browser;
<input type="text" name="username" placeholder="Type your username" />
Practical example
In this example, we use the input element's placeholder attribute to display hint for the input element.
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<body>
<label>
<span>Username:</span>
<input type="text" name="username" placeholder="Type your username" />
</label>
</body>
</html>