Menu

HTML TUTORIALS - HTML Forms

HTML Forms

ADVERTISEMENTS


<form action="back-end script" method="posting method">
    form elements like input, textarea etc.
</form>

ADVERTISEMENTS


<form action="/cgi-bin/hello_get.cgi" method="get">
First name: 
<input type="text" name="first_name" />
<br>
Last name: 
<input type="text" name="last_name" />
<input type="submit" value="submit" />
</form>

ADVERTISEMENTS

First name:
Last name:


<form action="/cgi-bin/hello_get.cgi" method="get">
Login : 
<input type="text" name="login" />
<br>
Password: 
<input type="text" name="password" />
<input type="submit" value="submit" />
</form>

Login :
Password :


<form action="/cgi-bin/hello_get.cgi" method="get">
Description : <br />
<textarea rows="5" cols="50" name="description">
Enter description here...
</textarea>
<input type="submit" value="submit" />
</form>

Description :


<form action="http://www.example.com/test.asp" method="get">
<input type="submit" name="Submit" value="Submit" />
<br /><br />
<input type="reset" value="Reset" />
<input type="button" value="Button"  />
</form>




<form action="http://www.example.com/test.asp" method="get">
<input type="image" name="imagebutton" src="URL" />
</form>


<form action="http://www.example.com/test.asp" method="get">
<button type="submit">Submit</button>
<br /><br />
<button type="reset"> Reset </button>
<button type="button"> Button </button>
</form>



<form action="/cgi-bin/checkbox.cgi" method="get">
<input type="checkbox" name="maths" value="on"> Maths
<input type="checkbox" name="physics" value="on"> Physics
<input type="submit" value="Select Subject" />
</form>

Maths Physics

<form action="/cgi-bin/radiobutton.cgi" method="post">
<input type="radio" name="subject" value="maths" /> Maths
<input type="radio" name="subject" value="physics" /> Physics
<input type="submit" value="Select Subject" />
</form>

Maths Physics

<form action="/cgi-bin/dropdown.cgi" method="post">
<select name="dropdown">
<option value="Maths" selected>Maths</option>
<option value="Physics">Physics</option>
</select>
<input type="submit" value="Submit" />
</form>


<form action="/cgi-bin/hello_get.cgi" method="post"
      name="fileupload" enctype="multipart/form-data">
<input type="file" name="fileupload" accept="image/*" />
</form>


<form action="/cgi-bin/hello_get.cgi" 
         method="get" name="pages">
<p>This is page 10</p>
<input type="hidden" name="pgaenumber" value="10" />
<input type="submit" value="Next Page" />
</form>

This is page 10


<form action="/cgi-bin/hello_get.cgi" method="get">
First name: 
<input type="text" name="first_name" />
<br>
Last name: 
<input type="text" name="last_name" />
<input type="submit" value="Submit" />
<input type="reset" value="Reset" />
</form>

First name:
Last name: