MODULE 3 β CSS Fundamentals
π Lesson 3.9 β Mini Project: Beautiful Profile Card
π¨ Building a Professional Student Profile Card Using HTML & CSS
π― Learning Objectives
After completing this lesson, students will be able to:
β Combine HTML and CSS Concepts
β Create a Professional Profile Card
β Apply Colors & Backgrounds
β Use Fonts & Typography
β Apply Borders & Shadows
β Create Stylish Buttons
β Build Real-World UI Components
β Design Modern Website Sections
π Introduction
Congratulations! π
You have completed:
β Introduction to CSS
β Inline CSS
β Internal CSS
β External CSS
β Colors & Backgrounds
β Fonts & Typography
β Borders & Shadows
β Styling Links & Buttons
Now it’s time to combine everything into a real project.
π What is a Profile Card?
A Profile Card is a small section that displays information about a person.
Examples:
Student Profile
Teacher Profile
Employee Profile
Developer Profile
Portfolio Website Card
π― Real World Example
You may have seen profile cards on:
- Portfolio Websites
- College Websites
Example:
---------------------------------
Rahul Kumar
Polytechnic Student
Learning Web Designing
[ Contact Me ]
---------------------------------
π― Project Requirements
Our Profile Card will contain:
β Name
β Student Information
β Skills
β About Section
β Contact Button
β Beautiful Design
ποΈ Project Structure
Profile Card
-------------------------
Student Name
Student Information
Skills
About
Contact Button
-------------------------
π» Step 1 β Create HTML Structure
<!DOCTYPE html>
<html>
<head>
<title>Profile Card</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
</body>
</html>
π― Step 2 β Create Card Container
Inside body:
<div class="card">
</div>
Why?
The card container will hold all profile information.
π― Step 3 β Add Student Name
<div class="card">
<h1>Rahul Kumar</h1>
</div>
Output
Student Name appears.
π― Step 4 β Add Student Information
<p>Polytechnic Student</p>
<p>Computer Science Branch</p>
Example
<div class="card">
<h1>Rahul Kumar</h1>
<p>Polytechnic Student</p>
<p>Computer Science Branch</p>
</div>
π― Step 5 β Add Skills
<h3>Skills</h3>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
Output
Skills section appears.
π― Step 6 β Add About Section
<h3>About Me</h3>
<p>
I am learning Web Designing and
want to become a Full Stack Developer.
</p>
π― Step 7 β Add Contact Button
<button>
Contact Me
</button>
HTML Structure Completed
<div class="card">
<h1>Rahul Kumar</h1>
<p>Polytechnic Student</p>
<p>Computer Science Branch</p>
<h3>Skills</h3>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
<h3>About Me</h3>
<p>
I am learning Web Designing and
want to become a Full Stack Developer.
</p>
<button>
Contact Me
</button>
</div>
π¨ Step 8 β Style Body
CSS
body{
background-color:#f5f5f5;
font-family:Arial;
}
Result
Light background.
Professional appearance.
π¨ Step 9 β Style Card
.card{
width:350px;
background-color:white;
padding:20px;
margin:auto;
}
Result
Card appears centered.
π¨ Step 10 β Add Border
.card{
border:2px solid blue;
}
Result
Blue border appears.
π¨ Step 11 β Add Rounded Corners
.card{
border-radius:15px;
}
Result
Modern rounded design.
π¨ Step 12 β Add Shadow
.card{
box-shadow:5px 5px 15px gray;
}
Result
Professional shadow effect.
π¨ Step 13 β Style Heading
h1{
color:blue;
text-align:center;
}
Result
Blue centered heading.
π¨ Step 14 β Style Paragraphs
p{
font-size:18px;
line-height:28px;
}
Result
Easy-to-read text.
π¨ Step 15 β Style Button
button{
background-color:green;
color:white;
padding:10px 20px;
border:none;
border-radius:10px;
}
Result
Modern green button.
π¨ Step 16 β Add Button Hover Effect
button:hover{
background-color:darkgreen;
cursor:pointer;
}
Result
Interactive button.
π» Complete Project Code
index.html
<!DOCTYPE html>
<html>
<head>
<title>Beautiful Profile Card</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="card">
<h1>Rahul Kumar</h1>
<p>Polytechnic Student</p>
<p>Computer Science Branch</p>
<h3>Skills</h3>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
<h3>About Me</h3>
<p>
I am learning Web Designing and
want to become a Full Stack Developer.
</p>
<button>
Contact Me
</button>
</div>
</body>
</html>
style.css
body{
background-color:#f5f5f5;
font-family:Arial;
}
.card{
width:350px;
background-color:white;
padding:20px;
margin:auto;
border:2px solid blue;
border-radius:15px;
box-shadow:5px 5px 15px gray;
}
h1{
color:blue;
text-align:center;
}
p{
font-size:18px;
line-height:28px;
}
button{
background-color:green;
color:white;
padding:10px 20px;
border:none;
border-radius:10px;
}
button:hover{
background-color:darkgreen;
cursor:pointer;
}
π― Expected Output
--------------------------------
Rahul Kumar
Polytechnic Student
Computer Science Branch
Skills
β’ HTML
β’ CSS
β’ JavaScript
About Me
Learning Web Designing
[ Contact Me ]
--------------------------------
With:
β Blue Border
β Rounded Corners
β Shadow Effect
β Professional Button
π« Real World Applications
Profile cards are used in:
β Portfolio Websites
β College Websites
β Student Management Systems
β Employee Management Systems
β Company Websites
π Enhancement Ideas
Add:
β Student Photo
β Social Media Links
β Email Address
β Phone Number
β Skill Progress Bars
β οΈ Common Beginner Mistakes
Mistake 1
Not Using External CSS
Keep CSS separate.
Mistake 2
Very Large Shadow
Wrong:
box-shadow:20px 20px 50px black;
Use:
box-shadow:5px 5px 15px gray;
Mistake 3
Too Many Colors
Limit to:
- Blue
- White
- Gray
- Green
Professional appearance.
π Best Practices
β Use professional colors.
β Use rounded corners.
β Add subtle shadows.
β Use proper spacing.
β Keep design clean.
π Final Mini Project Challenge
Create your own:
Student Profile Card
Include:
β Name
β College
β Branch
β Skills
β About Me
β Contact Button
Add your own styling.
π Practical Activity
Create a profile card for yourself.
Include:
- Name
- College Name
- Branch
- Skills
- Career Goal
Apply:
β Border
β Border Radius
β Shadow
β Hover Button
Run it in Chrome Browser.
π Assignment
Assignment 3.9
- What is a Profile Card?
- Why are profile cards used?
- Which property creates shadows?
- Which property creates rounded corners?
- Create a profile card using HTML and CSS.
- Add a contact button.
- Add hover effects.
π§ Quiz
Q1. Which property creates rounded corners?
A. border
B. radius
C. border-radius
D. round
β Answer: C
Q2. Which property creates element shadows?
A. shadow
B. box-shadow
C. text-shadow
D. border-shadow
β Answer: B
Q3. Which property changes background color?
A. color
B. bg
C. background-color
D. fill
β Answer: C
Q4. Which property changes font style?
A. font-family
B. text-family
C. style
D. family
β Answer: A
Q5. Which pseudo-class creates hover effects?
A. click
B. active
C. hover
D. over
β Answer: C
π Module 3 Summary β CSS Fundamentals
You have successfully learned:
β Lesson 3.1 β Introduction to CSS
β Lesson 3.2 β Inline CSS
β Lesson 3.3 β Internal CSS
β Lesson 3.4 β External CSS
β Lesson 3.5 β Colors & Backgrounds
β Lesson 3.6 β Fonts & Typography
β Lesson 3.7 β Borders & Shadows
β Lesson 3.8 β Styling Links & Buttons
β Lesson 3.9 β Mini Project: Beautiful Profile Card