Friday, April 9, 2010

html form and its elements notes


Form and its elements:-
Form is the client base plateform to request to the server and accept the data from the server and input the request to the server.

working with form contains two process:-
1.creating layout.
2.using element with script.

form is an interface where there are elements of its .
creating form:-
use tag to create the form:-
<form>....................</form>
attributes:-
name,method,action
Elements of the form:-
elements-------closing tag or not
input -no
option -no
select -yes
textarea -yes

using these elements we can create the following controls:-
.textfield(textbox)
.button:-
commandbutton
reset button
submit button
.radio button(option button)
.check box
.dropdownlistbox(combo box)
.list box
.text area (mail box)
.password textbox.
using input element:-
we can create following control using input elements:-
1) textbox.
2) Password textbox
3) Command button(normal).
4) Reset button.
5) Submit button.
6) Check box
7) Option button(Radio button).

1.textbox:-
it is used to write /input some text to send to the server from client.

creating tag:-
<input>
attributes:
type="text"
name="seprate name of the textbox"
maxlength="number for limited text"
syntax:-
<form>
information text<input type="text" name="txt1" maxlength="number">
</form>

2.Password box:-
using this we can create the password text with masking characters.
tag:-
<input>
attributes:-
type="password"
name="seperate name for text box"
maxlength="number"
syntax:-
<input type="password" name=" " maxlength =" " >
_______________________________________________
3.Button:-
It is used to give the command for instruction on click, double click, keydown event.
Element:-
<input>
attributes:-
type="button"
name="cmd any name"
value="caption"
size="Number"
syntax:-
<input type=" " name=" " value=" " size= " ">
_________________________________________________
4.Reset button:-
It is used to blank or refresh the written text in the textboxes.
Tags:-
<input>
attributes:-
type="reset"
name="rst name"
value="caption "
syntax:-
<input type=" " name=" " value=" ">
----------------------------------------------------------
5.submit:-
it is used to send the information for request from client side to server.
tag:-
<input>
attributes:-
type="submit"
name="sub name"
value="caption"
syntax:-
<input type=" " name=" " value="submit ">

6.Radio button:-
It is used for optional choice, when one is selected other is unselected. For optional selection ,the name of buttons should be same but value different.

Element:-
<input>
attributes:-
type="radio"
name="rdo name"
value="value for selection"
syntax:-
<input type=" " name=" " value=" ">display value

#The name of the button should be similar.
----------------------------------
7.Check box:-
using check box we can check the multiple options, for this the name are used differently.
Element:-
<input>
attributes:-
type="checkbox"
name="chk name"
syntax:-
<input type=" " name=" ">display name
________________________________________________
SELECT ELEMENT AND OPTION ELEMENT:-
_______________________________________________
using these element we can create the combo box(dropdown list box) and list box.
combo box:-
it is used to choose the required option from the multiple values in the client side. The combo box can store the multiple values within the small place.
we use following two tags to create combo box:-
<select>
<option>
</select>

attributes of
select -name
option-value

syntax:-
<select name=" ">
<option value=" ">display value
<option value=" ">display value
</select>

List box:-
-----------------------------
It is also used to select the given options like in combo box but it does not have the drop down list box.
It displays multiple data.

to create list box we use "multiple" word in the select tag.
Syntax:-
<select name="lst name" multiple>
<option value=" ">display name
</select>

=====================================
Textarea(Email text):-
It is used to create the large text box ,where we can write multiple text ,specially to write the text for the email .
It is one closing tag.
tag:-
<textarea>..................</textarea>
attributes:-
name="txt name"
rows="number"—for height
cols="number"-for width
syntax:-
<textarea name=" " rows=" " cols=" ">
.......
</textarea>


For Further Reading,
HTML Notes

0 comments:

Post a Comment

 

Popular Posts

Man Behind This Blog