HTML Forms
Here i am going to explain about how to create a simple form in html.
Introduction
HTML Forms are used to take input from user and pass data to server. HTML form provide a better and attractive user interface for client or user. It is most widely used in web sites. A form can contain fallowing types of input elements
- Text fields
- Checkboxes
- Radio-buttons
- Submit buttons
- Select lists
- Textarea
- Fieldset
- Legend
- Label elements
Code that we use it to create a simple forms
<html>
<head>
<title></title>
</head>
<body>
<form id="form1" runat="server">
First name: <input type="text" name="firstname" /><br /><br />
Last name: <input type="text" name="lastname" /></br><br />
Password: <input type="password" name="pwd" /></br><br />
<input type="radio" name="sex" value="male" /> Male<br /><br />
<input type="radio" name="sex" value="female" /> Female<br><br>
<input type="submit" value="Submit" />
</form>
</body>
Output