- Home
- /
- CSS Forms
CSS Tutorial
Introduction
CSS Properties
CSS Designing
CSS Advance Topics
CSS FAQs
- Home
- /
- CSS Forms
CSS Forms
Forms are an essential part of every website — especially when users need to sign up, log in, or submit data. HTML creates the structure, but CSS turns that structure into something visually appealing and user-friendly.
Let’s create a Registration Form and style it beautifully with CSS.
Basic HTML Registration Form (Unstyled)
Here’s a simple form structure without any CSS:
User Registration – Learn With Arshyan
Register Your Account

Without styling, this form looks plain and basic. Let’s fix that.
Styling the Form with CSS
Now we’ll add a clean and modern design using CSS:
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #eef3f7;
margin: 0;
padding: 40px;
}
section {
background-color: #ffffff;
width: 400px;
margin: auto;
padding: 25px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h2 {
text-align: center;
color: #2c3e50;
}
form {
margin-top: 20px;
}
label {
font-weight: 600;
display: block;
margin-bottom: 6px;
color: #34495e;
}
input[type="text"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 18px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type="submit"],
input[type="reset"] {
width: 100%;
padding: 10px;
margin-top: 10px;
border: none;
font-weight: bold;
color: white;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"] {
background-color: #27ae60;
}
input[type="reset"] {
background-color: #c0392b;
}
input[type="submit"]:hover {
background-color: #1e8449;
}
input[type="reset"]:hover {
background-color: #922b21;
}

Result – Stylish Registration Form
After applying the CSS, your form now has:
A centered, card-style layout
Smooth input spacing and borders
A vibrant color scheme for buttons
Clean, modern hover effects
Tip from Learn With Arshyan
A well-designed form improves user experience, builds trust, and encourages more users to complete it.
You can now try customizing this form further by changing:
Background colors
Font sizes and families
Border radii or shadows
Adding input validation or animations