How to Create Registration Form in HTML

Here in this post, we will create an HTML Registration Form

Table of Contents

HTML Registration form code

<!DOCTYPE HTML>
<html>
<head>
  <title>Register Form</title>
</head>
<body>
 <form>
  <table border="1">
   <tr>
    <td>Name :</td>
    <td><input type="text"></td>
   </tr>
   <tr>
    <td>Password :</td>
    <td><input type="password"></td>
   </tr>
   <tr>
    <td>Gender :</td>
    <td>
     <input type="radio" name="Gender"> Male
     <input type="radio" name="Gender"> Female
    </td>
   </tr>
   <tr>
    <td>Email :</td>
    <td><input type="email"></td>
   </tr>
   <tr>
    <td>Phone no :</td>
    <td>
     <select>
      <option>91</option>
      <option>92</option>
      <option>93</option>
      <option>94</option>
      <option>95</option>
      <option>96</option>
     </select>
     <input type="phone">
    </td>
   </tr>
   <tr>
    <td><input type="submit" value="Submit"></td>
   </tr>
  </table>
 </form>
</body>
</html>
In the above code, we use a <table> tag to format our form. Inside a table we use <tr> (table row) and <td> (table data). Where <tr> is used to make a row in a table and <td> is used to make a column on that row of the table.

We make our first row (lines 9 – 12) we make a column for name and its input field.

In a second row (line 13 – 17) we make a column for password and its input field.

After that, we make another row (line 18 – 23) we make a column for gender and make a radio button input field for gender.

(Line 24 – 27) We make another row for the email address.

(Line 28 – 41) Here we make a row for phone number input field and for a country code.

(Line 42 – 44) At last, we make a submit button.

And here we complete making our Registration form in HTML

The output of registration form code:

Leave a Comment

Your email address will not be published. Required fields are marked *