In this tutorial, you will learn how to create a simple and responsive registration form using only HTML and CSS. This form allows users to register on your website and can be easily adapted for different purposes, such as educational, e-commerce, or membership sites.
Introduction
User registration forms are commonly used on websites to collect and store user information. They help users create an account to access additional features or content.
In this guide, you will learn step by step how to create a clean and functional registration form using only HTML and CSS.
Before starting, make sure you have:
Step 1: HTML Code
Create a new file named index.html. This file will contain the structure of the sign-up form. Copy and paste the following code into your HTML file and save it.
Explanation
- The
<form>element holds all the input fields. - Each input field uses the
requiredattribute to ensure users cannot leave it blank. - The form includes inputs for
name,email,password, andconfirm password. - The “Login Here” link provides an option for users who already have an account.
Step 2: CSS Code
Next, create a file named styles.css. This file will contain the styling rules for the registration form. Copy and paste the following CSS code exactly as it is.
Explanation
- The
bodyuses a linear gradient background and removes default margins and padding. - The
.centerclass positions the form at the center of the screen. - Each
input fieldhas an animated label that moves upward when the field is active or filled. - The
submit buttonchanges color on hover to give a clear interaction effect. - The form layout is responsive and uses viewport width and height units for scaling.
Final Output
When you open the HTML file in a web browser, you will see a simple and responsive registration form with clean animations and a gradient background.

Conclusion
By following these steps, you have created a functional and visually clear registration form using only HTML and CSS.
This project demonstrates how to combine HTML structure with CSS styling to design a modern, user-friendly interface without using JavaScript. You can modify the colors, font, and layout to match your website’s design.
This basic form can serve as the starting point for building more advanced registration systems in the future.
