EN
HTML - reset input
3 points
In this article, we would like to show you how to use reset input button to reset form in HTML.
Quick solution:
xxxxxxxxxx
1
<input type="reset" value="Reset Form" />
Note:
The reset
input
button resets each filed insideform
element.
In this example, we create reset input
that appears as a button that resets form
to default values (empty strings are default values).
xxxxxxxxxx
1
2
<html>
3
<body>
4
<form>
5
<label>
6
<span>Username</span>
7
<input type="text" name="username" />
8
</label>
9
<br />
10
<label>
11
<span>Password</span>
12
<input type="password" name="password" />
13
</label>
14
<br />
15
<input type="reset" value="Reset Form" />
16
</form>
17
</body>
18
</html>