HTML Forms are used to pass data between client and server
These forms contains input fields like input text box,select box,text area any of these and more.
It is created using form tag with closing form tag as follows
It takes name,method,action as its main parameters
Where name is the name of form,
method is the type of form as post or get
and action is the specified url to perform operations using the inout data
POST is used when data has to be hidden while passing between client and server
GET is used for small amount of data and when get is used the data is visible in the url.
HTML Form Elements
There are many HTML Form Elements as follows
- Input Text Box
- Password Text Field
- Radio Buttons
- Text area
- Checkboxes
- Submit Button
Input Text Box
This is used to get the input of user for name,age or city any data.
This is created as follows
Password Field
This is used to get the password of user.
This is created as follows
Radio Buttons
This is used to display an option for user among choices like male,female etc.
This is created as follows
maleFemale
Check Boxes
This is used to display an option for user among choices yes or no etc.
This is created as follows
YesNo
Submit Button
This is used to submit form data to server to save them to database or manipulate them in any way.
This usedas follows
This is used exclusively with forms which has n nunber of data to be processed.
Text area
This is used to get more data like address etc.
This is created as follows
This takes rows and cols as its attributes where rows is the height of area and cols is the width of area
No comments:
Post a Comment