HTML
Hypertext Markup Language
A form in HTML is enclosed between the <form> and </form> tags.
The form itself contains regular text; other HTML elements such as tables;
and form elements such as checkboxes, dropdown menu and text fields.
Form Tags
Tag | Display | Description |
---|---|---|
Action | The Action attributes is usually set to a URL of the program that will handle the from data. | |
<input type="text"> | This can be used to text entry type. To set a text entry control, use this input element. | |
<input type="Password"> | The password style of form control is the same as the simple text entry field, except that the input to the field is not revealed. | |
<input type="radio"> | Male Female | It allow only one choice. This functionality says that when an item is selected, it deselects the previously pressed item. |
<input type="checkbox"> | Chess Cricket | It can be used to a group of checkboxes that the user can check off. |
<textarea></textarea> | To set the number of rows in the text entry area. To set the number of characters per line set the cols attribute. | |
<select> <option></option> </select> | It can be used to select one choice out of many possible choices. | |
<input type="submit"> | It can be used to once a form has been filled. |
HTML Code
<html>
<head>
<title>table</title>
</head>
<body>
<form action="/index.php"> <caption> <h3>Form</h3> </caption> <label >First Name</label>
</br> <input type="text">
</br> <label >Last Name</label>
</br> <input type="text">
</br> <label >Gender</label>
</br> <input type="radio">
<label >Male</label>
<input type="radio">
<label >Female</label>
</br> <label >Education</label></br> <select > <option >B.sc<option > <option >B.com<option > </select ></br> <label >Hobbies</label></br> <input type="checkbox">
<label >Reading</label>
<input type="checkbox">
<label >Dancing</label>
</br> <label >Address</label></br> <textarea></textarea>
</br> <label >Password</label>
</br> <input type="password">
</br></br> <input type="submit"> </form> </body> </html>
<head>
<title>table</title>
</head>
<body>
<form action="/index.php"> <caption> <h3>Form</h3> </caption> <label >First Name</label>
</br> <input type="text">
</br> <label >Last Name</label>
</br> <input type="text">
</br> <label >Gender</label>
</br> <input type="radio">
<label >Male</label>
<input type="radio">
<label >Female</label>
</br> <label >Education</label></br> <select > <option >B.sc<option > <option >B.com<option > </select ></br> <label >Hobbies</label></br> <input type="checkbox">
<label >Reading</label>
<input type="checkbox">
<label >Dancing</label>
</br> <label >Address</label></br> <textarea></textarea>
</br> <label >Password</label>
</br> <input type="password">
</br></br> <input type="submit"> </form> </body> </html>
Output