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 :

              input elements

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:

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

 Password fields:

By this form you can select the password of user.


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

Radio Buttons:

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


<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

html form radio


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.



<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


html form checkbox

Submit button:

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


<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>



Legend tag:

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




<legend>Your info</legend>

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

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

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



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.