menu
Ad goes here

Monday, 3 September 2012

HTML Form

Suppose you are looking for services on Internet. Whenever you will try to take the services form there then obviously you have to contact them and the form will be behind the process. The HTML forms are used to pass data to server.

A form contain text fields, Password Field, textarea , checkboxes, radio-buttons, submit buttons, label, legend, fieldset, and more.


Text Field Code

<form>
First Name: <input type="text" name="first-name" />
Last Name: <input type="text" name="last-name" />
</form>

Text Field

First Name:
Last Name:


Password Field Code

<form>
Password: <input type="password" name="pwd" />
</form>

Password Field

Password:


Textarea Code

<form>
Comment: <textarea name="comment" cols="5" rows="3"></textarea>
</form>

Textarea

Comment:


Radio Buttons Code

<form>
<input type="radio" name="male" value="male" /> Male<br />
<input type="radio" name="female" value="female" /> Female
</form>

Radio Buttons

Male
Female


Checkbox Code

<form>
<input type="checkbox" name=" tutorial " value="HTML" /> HTML<br />
<input type="checkbox" name="tutorial" value="CSS" /> CSS
</form>

Checkbox

HTML
CSS


Submit Button Code

The submit button is used to send form field data to a server. The data is sent to the page specified in the form's action.

<form name="input" action="html_form_action.asp" method="get">
Username: <input type="text" name="user" />
<input type="submit" value="Submit" />
</form>

Submit Button

Username:


No comments:

Post a Comment

Books for you (Crafted with )