- Choose a HTML editor
- Create a new file with extension .htm or .html
- Add the code to file (File name should be like index.html or file_name.html).
- Fill the fields and create the form.
Type:
<!DOCTYPE html>
<html>
<head>
<title>Registration Page</title>
</head>
<body>
<h1>Register form using HTML</h1>
<table>
<form action="reg2.php" method="POST">
<tr>
<td><label>First Name</label></td>
<td><input type="text" name="fname"></td>
</tr>
<tr>
<td><label>Last Name</label></td>
<td><input type="text" name="lname"></td>
</tr>
<tr>
<td><label>Gender</label></td>
<td><input type="radio" name="gender" value="male"> <label>Male</label><br>
<input type="radio" name="gender" value="female"> <label>Female</label><br>
<input type="radio" name="gender" value="other"> <label>Other</label>
</td>
</tr>
<tr>
<td><label>Email</label></td>
<td><input type="email" name="email"></td>
</tr>
<tr>
<td><label>Password</label></td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td><label>Password</label></td>
<td><input type="submit" name="submit" value="submit"></td>
</tr>
</form>
</table>
</body>
</html>