How to Create Registration Form in HTML – Easy

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

HTML Registration form code

<!DOCTYPE HTML>
<html>
<head>
  <title>Register Form</title>
</head>
<body>
 <form>
  <table>
   <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>977</option>
      <option>978</option>
      <option>979</option>
      <option>973</option>
      <option>972</option>
      <option>974</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:

Registration form in HTML
Registration form image

And this is how to create Registration Form in an HTML

Hand peck relevant post for you:

Share this content with your friend.

0 0 votes
Article Rating
Subscribe
Notify of
11 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Joshua Gottus
2 years ago

how do i make a server

Nawaraj Shah
2 years ago

No where but if you want to send data then you need server side language

Nawaraj Shah
2 years ago

Read this post
HTML form with database

Main Blog
3 years ago

where to put this script?

Nawaraj Shah
3 years ago

after writing this code, just save it in dot html extention

Amazing world
2 years ago

nice brother

Nawaraj Shah
2 years ago

No where but if you want to send data then you need server side language

Joshua Gottus
2 years ago

how do i make a server

Aigle Libre
Aigle Libre
8 months ago

can you help me ? I am new to php and when adding a user I have the following error message:

prepare($SELECT);
$stmt->bind_param(“s”, $email);
$stmt->execute();
$stmt->bind_result($email);
$stmt->store_result();
$rnum = $stmt->num_rows;
if ($rnum==0) {
$stmt->close();
$stmt = $conn->prepare($INSERT);
$stmt->bind_param(“ssssii”, $username, $password, $gender, $email, $phoneCode, $phone);
$stmt->execute();
echo “New record inserted sucessfully”;
} else {
echo “Someone already register using this email”;
}
$stmt->close();
$conn->close();
}
} else {
echo “All field are required”;
die();
}
?>