You can see WEB forms in every WEB site, mostly contact forms. You need to use <form> tag to define a WEB form. Method="" attribute defines the how to send your form values. It has two type, post which you send data by posting and get which you send data on address bar of your browser. Also we have action="" attribute that you define to which page you will send your form data.
<form action="contact.PHP" method="post">
</form>
As you see, I typed a page "contact.PHP" because to be able to use data sent by WEB form, you need to use dynamic WEB languages like asp, PHP or cgi. HTML can not handle this form data, HTML WEB form is just a tool to get data from user and send it to dynamic WEB page to handle.
To be able to define data values, we have some tags. By using <input> tag we can get short string values or define submit button which causes the post data when user clicks on it. To define input tag type we need to use type="" attribute and to define name of input tag we use name="" attribute and at last to define default value for input tag we use value="" attribute.
<input type="text"> defines text input
<input type="hidden"> defines hidden text input
<input type="password"> defines password text input
<input type="submit"> defines the submit button
<input type="reset"> defines the reset button
<input type="radio"> defines a input which force us to select one of all. For example you want to get gender information, you should use radio input because user can be male or female, not both. You should know that to be able to do this you should use the same name for all radio input boxes.
<input type="checkbox"> define check box which user can select more than one at the same time.
To be able to define text area, we need to use <textarea> tag and we need to close it by </textarea>. We can define the number of the columns and rows by using cols="" and rows="" attributes sequentially.
<textarea name="message" cols="100" rows="5"></textarea>
To be able to define select list, you need to use <select> tag and you can define select options by using <option> tag.
<select name="educationlevel">
<option value="highschool">High School</option>
<option value="university">University</option>
</select>
As you see, with value="" attribute we define the value of the option and between <option> and </option> tags we define the sentence which user will see.
An example for form:
<form action="contact.PHP" method="post">
You name : <input type="text" name="username">
<br>
Your email : <input type="text" name="useremail">
<br>
Your gender : <input type="radio" name="gender" value="male">
<input type="radio" name="gender" value="female">
<br>
<textarea name="usermessage" cols="100" rows="5"></textarea>
<br>
<input type="reset" name="reset" value="reset">
<input type="submit" name="submit" value="submit">
</form>










