HTML Form Tutorial

HTML Form Tutorial

This post is especially about HTML Form Tutorial so you can make form in HTML document.
Form is used to create forms on web pages. As the name suggests, the form used to take input from the user and will be further processed.
 
Form on web pages is defined by the couple <form> tag and </ FROM>. <form> Tag has two important attributes, namely METHOD attribute to specify how the applicable form, and ACTION attributes are often loaded exact URL form further processing.
Form the basic structure is:
 

<FORM [METHOD="POST|GET]" ACTION="URL">
...
</ FORM>
HTML code for the complete sample form are as follows:
 

<BODY>
<form Method="POST" ACTION="post.htm">
<table>
<TR>
<TD> Name: </ TD>
<TD> <INPUT TYPE = "Text" NAME = "varName"
VALUE = "John" SIZE = "15"> </ TD>
</ TR>
<TR>
<TD> Address: </ TD>
<TD> <INPUT TYPE = "Text" NAME = "varAddress"
SIZE = "30"> </ TD>
</ TR>
<TR>
<TD> Password: </ TD>
<TD> <INPUT TYPE = "Password"
NAME = "varPassword" SIZE = "10"> </ TD>
</ TR>
</ TABLE> Sex:
<input checked TYPE="Radio" NAME="gender" VALUE="male"> Male
<input TYPE="Radio" NAME="gender" VALUE="female"> Female
<BR> Hobbies: <BR>
<input TYPE="Checkbox" NAME="hobby" VALUE="football"> Football
<input checked TYPE="Checkbox" NAME="hobby" VALUE="badminton"> Badminton
<input TYPE="Checkbox" NAME="hobby" VALUE="computer"> Computers
<BR>
<input TYPE="Checkbox" NAME="hobby" VALUE="game"> Video Games
<input Checked TYPE="Checkbox" NAME="hobby" VALUE="Internet"> Internet
<input TYPE="Submit" VALUE="Send info">
<input TYPE="Reset" VALUE="Clear form">
</ FORM>
</ BODY>
</ HTML>
HTML Form Tutorial by Top HTML

0 comments:

Post a Comment