What is a FORM in HTML ?

A Form is that section of a document that contains some normal text, HTML markup, controls and labels for those controls. A web user usually fills out values into the different controls and clicks the Submit button.

The Submit button “submits” the contents that the user filled, the an agent for processing. This processing agent can be a Web Server, a mail server, an application server etc.

Ok, So how exactly do you declare a form in HTML?

Forms in HTML are declared using the <FORM> tag. Inside the <FORM> tag, you can place HTML markup for different controls, labels and submit buttons.

Good.Now how exactly do you submit the form content to the Server?

The form is submitted to the server by specifying a value – usually another webpage name -  in the action attribute and a value in the method attribute, which is either GET or POST.

<form name="input" action="html_form_submit.php" method="get">
username:
<input type="text" name="username" />
<input type="submit" value="Submit" />
</form>

, , {0}

Leave a Reply