HTML Forms:
Forms in HTML are used with <form> tag. It starts with <form> and ends with </form>. <form> tag has some attributes like "name", "action", "method" etc.
There are several input elements in HTML form. Some of them are text field, password field, radio button, check box, button (submit or reset), drop down list etc.
To send data throw a HTML form, there are two methods - "GET" and "POST". If the GET method is used then the information will be visible to everyone (through the browser address bar). But if the POST method is used to send information then the data will become invisible to others.
Example of Text field:
Example of Password field:
Example of Radio Button:
Example of simple Drop down list:
Example of Button:
Help Links:
Forms in HTML are used with <form> tag. It starts with <form> and ends with </form>. <form> tag has some attributes like "name", "action", "method" etc.
There are several input elements in HTML form. Some of them are text field, password field, radio button, check box, button (submit or reset), drop down list etc.
To send data throw a HTML form, there are two methods - "GET" and "POST". If the GET method is used then the information will be visible to everyone (through the browser address bar). But if the POST method is used to send information then the data will become invisible to others.
Example of Text field:
<form>HTML view of this example:
Name1: <input type="text" name="name1" /><br />
Name2: <input type="text" name="name2" />
</form>
Name1:
Name2:
Example of Password field:
<form>HTML view of this example:
Password: <input type="password" name="pass" />
</form>
Password:
Example of Radio Button:
<form>HTML view of this example:
<input type="radio" name="menu" value="menu1" /> menu1<br />
<input type="radio" name="menu" value="menu2" /> menu2
</form>
menu1Example of Check Box:
menu2
<form>HTML view of this example:
<input type="checkbox" name="menu" value="menu1" /> menu1<br />
<input type="checkbox" name="menu" value="menu2" /> menu2
</form>
menu1
menu2
Example of simple Drop down list:
<form>HTML view of this example:
<select name="menu">
<option value="first">First</option>
<option value="second">Second</option>
<option value="third">Third</option>
</select>
</form>
Example of Button:
<form name="input" method="get">HTML view of this example:
Name: <input type="text" name="name" />
<input type="submit" value="Submit" />
</form>
Help Links:
Nice..
ReplyDelete