Create a Registration form in HTML -CSS - makcode.in

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>
<html>
<head>
  <link rel="stylesheet" type="text/css" href="registration.css">
  <title></title>
</head>
<body>
<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>
</div>
</body>
</html>

Adding a CSS – registration.css

/* makcode.in Simple CSS login form */
.login { 
  height:200px;
  width:190px;
  margin:auto;
  border:1px #CCC solid;
  padding:10px;
}
.login input { 
  padding:5px;
  margin:7px
 }