Turning Learners Into Developers
Codekilla
CODEKILLA
// projects.css

10 Best CSS Projects

Hand-picked and ordered easiest → hardest — each with complete code and expected output. Build these to turn lessons into a portfolio.

Back to CSS course
// solution.code
css3
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Personal Profile Card</title>
  <style>
    /* Reset default margin and set body background */
    body {
      margin: 0;
      padding: 20px;
      background-color: #f0f0f0;
      font-family: Arial, sans-serif;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
    }
    
    /* Card container with box model properties */
    .profile-card {
      background-color: white;
      border: 2px solid #ddd;
      border-radius: 10px;
      padding: 30px;
      width: 300px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      text-align: center;
    }
    
    /* Profile photo styling */
    .profile-photo {
      width: 120px;
      height: 120px;
      border-radius: 50%;
      border: 4px solid #4CAF50;
      margin-bottom: 20px;
      object-fit: cover;
    }
    
    /* Name heading */
    .profile-name {
      font-size: 24px;
      color: #333;
      margin: 10px 0;
    }
    
    /* Bio text with spacing */
    .profile-bio {
      font-size: 14px;
      color: #666;
      line-height: 1.6;
      margin-top: 10px;
    }
  </style>
</head>
<body>
  <div class="profile-card">
    <img src="https://via.placeholder.com/120" alt="Profile Photo" class="profile-photo">
    <h2 class="profile-name">Jane Doe</h2>
    <p class="profile-bio">Web developer passionate about creating beautiful and functional user interfaces. Love coding, design, and coffee.</p>
  </div>
</body>
</html>
output
Displays a centered white card with rounded corners and shadow containing a circular profile image (120px), a name heading 'Jane Doe', and a short bio paragraph. The card is 300px wide with proper padding and spacing between elements.