Site icon TestingDocs.com

HTML Submit Button

Overview

An HTML submit button helps the user to submit the information entered in the HTML fields.

The normal use case is that the user enters the required information in the HTML form fields, and clicks the Submit button on the HTML page. The page will take the user to target destination page specified in action attribute in the HTML form.

Syntax

Below is the syntax to add the button to the HTML page.

<input type=”submit” value=”Submit” />

The attribute type=”submit” specifies that the field is a submit button. The value attribute specifies the text on the submit button.

Example

<html>
<!–
####################################
# HTML Submit Button Demo
# www.TestingDocs.com
####################################
–>
<head>
<title> HTML Tutorials – HTML Submit Button Demo</title>
</head>

<body>
<h1> Contact Form </h1>
<p>
Display a sample HTML Form:
</p>

<form>
<br/>

<strong>Your Name :</strong>
<input id=”name” type=”text”/>
<br/>
<br/>

<strong>Your Email Address:</strong>
<input id=”email” type=”text”/>
<br/>
<br/>
<strong>Enter Text : </strong>
<br/>
<br/>
<textarea rows=”6″ cols=”50″> </textarea>
<br/>
<br/>
<input id=”submit” type=”submit”/>
<br/>
<br/>
</form>
<p>
<h2>
HTML Tutorials – www.TestingDocs.com
</h2>
</p>

</body>
</html>

Reset Button

A Reset button is used to clear the entered information from the HTML fields.

Syntax

We can set the type attribute as type=”reset”

<input type=”reset” value=”Reset” />

HTML Tutorials

HTML Tutorials on this website:

https://www.testingdocs.com/html-tutorials/

More Information on HTML:

https://www.w3.org/TR/html401/intro/intro.html

Exit mobile version