Use of Forms in HTML
Forms in HTML
Forms are used to design a webpage for the user to enter required details
that are further sent to the server through processing. Forms are also known as Web-form and Html-form. The <form> tag is
used to add HTML Form to the webpage for user input.
Syntax :
<form action="" method="" target="" autocomplete="">
----
</form>
Uses of Forms :
- Forms are used to retrieve data from users or customers.
- Forms are used for online surveys.
- Forms are used for conducting online exams.
Attributes of Forms
1. action=" "
It specifies the operation that is needed to be performed, once the form
is submitted. Generally, input data entered by the user is sent to the
server when the user clicks on the submit button.
2. method=" "
This attribute is used to define the HTTP method to perform operations
on forms data. It generally accepts two values such as "GET" and
"POST".
3. autocomplete=" "
This form attribute is used to specify whether autocomplete is
enabled or disabled. It has only two values such as "on" or
"off".
4. target=" "
It tells the browser to display the response in a specific window
or tab. It uses values as given in the table below :
Tags | Description |
---|---|
_blank | It displays the response in New Tab |
_self | It displays the response in Current Window |
_parent | It displays the response in Parent Frame |
Basic Form Implementation
<!DOCTYPE html>
<html>
<head>
<title> Form Implementation</title>
</head>
<body>
<h2>This is the Basic Form Implementation</h2>
<form action="" method="" target="" autocomplete="">
First Name : <input type="text">
Last Name : <input type="text"><br><br>
User Name : <input type="text"><br><br>
Passoword : <input type="password"><br><br>
<input type="submit"> <input type="reset">
</form>
</body>
</html>
So, now it's time to end the session. See you guys Next Time, stay
tuned for further updates on HTML Programming Languages...!!!
Our website will definitely help you to improve your
Programming Skills and Knowledge.
Thanks for Visiting...!!!
0 Comments
Please do not add Any Spam link in Comments !