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:
xxxxxxxxxx
1
<input type="text" name="username" placeholder="Type your username" />
In this example, we use the input element's placeholder
attribute to display hint for the input
element.
xxxxxxxxxx
1
2
<html>
3
<body>
4
<label>
5
<span>Username:</span>
6
<input type="text" name="username" placeholder="Type your username" />
7
</label>
8
</body>
9
</html>