XHTML » input » type="reset"

The type="reset" control creates a rectangular button that can be clicked when the user wants to clear all of the fields in a form. The form is redisplayed in its original presentation.

By default the reset button is a gray color and has the text "Reset" displayed inside the button. However, you can change the color using style sheets and you can use the value button to provide a different text for the button. The text displayed on the button will set the minimum size, but you can set a different size using style sheets or the size attribute.

A name is not required, but it is becoming a very common coding practice to give a unique name to every control (field) in a form.

Examples

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>DevGuru XHTML input Tag Example</title>
</head>
<body>
<form>
<input type="reset" value="Clear The Form" name="reset1" />
</form>
</body>
</html>
Output:
Language(s): HTML