HTML - Form Elements

HTML also provide some tag to create user interface like forms,textboxes,checkboxes,radio buttons,password field etc.to create different element of user interface.

<form>...</form>

Forms are mechanism that allows users to enter different information through the control given in the forms and submit that information to server,because of this they are used to create interactive web pages.

The <form> tag comes at the beginning of any form.when you create <form> tag,you also define the script it uses and how it sends data using the action and method attributes.

Attribute

Description

action

This attribute point the form to an URL that will accept the form's information and do something with it.if you don't specify an action,it sends the information back to the same URL,the page came from.

method

This attribute tells the form how to send its information to the URL specified in action.the most common method is post,which sends all the information from the form separately from the URL the other option for method is ge which attaches the information from the form to the end of the URL.

Syntax


<form method="get/post" action="file path">

</form>
							
Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!