Create a Registration form in HTML -CSS -

The HTML <form> is used to collect user input.

An HTML form contains so many form elements.

Form elements are different types of input elements, like text fields, radio buttons ,checkboxes, submit buttons, select box and much more.

The <input> Element

The <input> element is one of the most important form element in HTML.

There are several <input> element can be displayed in several ways, depending on the type attribute.

How to use:

  • Open text editor like Notepad or any other.
  • Copy HTML code and paste into the text editor.
  • Save file as registration.html or registration.htm
  • Create new document.
  • Copy and paste CSS code into text editor.
  • Save file as registration.css

<!DOCTYPE html>
  <link rel="stylesheet" type="text/css" href="registration.css">
<div class="login">
    <input type="text" placeholder="Name" id="name">  
  <input type="username" placeholder="Username" id="username">
  <input type="password" placeholder="Password" id="password">
<input type="email" placeholder="Email" id="email">   
  <center><input type="submit" value="Register Now"></center>

Adding a CSS – registration.css

/* Simple CSS login form */
.login { 
  border:1px #CCC solid;
.login input {