Html Forms And Input On Web Page

Html forms and input :

Html forms are mainly used for select user input. Such as user name, password e.t.c.

Html forms are made by <form> tag.

 Syntax :

 <form>
              input elements
</form>

The input elements are most important for making form. Inpur elements are used to select user info.

 Text fields speacially used for user name, parents name, Living place.

Follow the syntax for text fields:

<form>
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
</form>

 Password fields:

By this form you can select the password of user.

Syntax:

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

Radio Buttons:

By the help ofRadio Buttons user can select only one from the limited of choice.

Syntax: 

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

html form radio

Checkboxes:

A user can select one or more option at a time. For example a user may buy shirt, pant, glass. He can check this three at a time by this checkbox.

Syntax: 

<form>

<input type="checkbox" name="cloth" value="Bike">Shirt<br>

<input type="checkbox" name="gloth" value="Car">Pant<br>

<input type="checkbox" name="cloth" value="Bike">Glass<br>

<input type="checkbox" name="gloth" value="Car">Cap

</form>

html form checkbox

Submit button:

When you want to submit something you need to get help from submit button.

Syntax:

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

html form submit

Making dropdown:

You can make dropdown menu by the following syntax;

<form action="#">

<select name="Dress">

<option value=" Shirt ">Shirt</option>

<option value=" Pant ">Pant</option>

<option value=" Tie ">Tie</option>

</select>

</form>

Legend tag:

If you want to creat a group related form you can use this tag.

Syntax:

<form>

<fieldset>

<legend>Your info</legend>

Name: <input type="text"><br>

Date of birth: <input type="text">

Email: <input type="text"><br>

</fieldset>

</form>

You can see  All example of html forms .Just see the name and click on the link, than you can get the main example of them.

You can also position this from and property by css. Look at css position article for more details.

Roy Jemee is a professional Blogger. Apart of blogging he likes to play with mathematics. He knows Blogging, Wordpress, PHP, javascript , SEO and some other.