Cyber Code Academy
Tutorials Academy Courses
Home / CSS / CSS Mini Project: Responsive Profile Card

CSS Mini Project: Responsive Profile Card

Project goal

Create a clean profile card that works on mobile and desktop.

HTML

<article class="profile-card">
  <img class="profile-card__image" src="portrait.jpg" alt="Portrait of Alex">
  <div>
    <p class="profile-card__eyebrow">Web Developer</p>
    <h2>Alex Morgan</h2>
    <p>I build accessible, responsive web experiences.</p>
    <a class="profile-card__link" href="#contact">Contact Alex</a>
  </div>
</article>

CSS starter

:root { --accent: #2563eb; --radius: 1rem; }
.profile-card { display: grid; gap: 1.25rem; padding: 1.25rem; border: 1px solid #dbe2ea; border-radius: var(--radius); }
.profile-card__image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .75rem; }
.profile-card__link { color: var(--accent); font-weight: 700; }
@media (min-width: 40rem) { .profile-card { grid-template-columns: 10rem minmax(0, 1fr); align-items: center; } }

Checklist

  • Image has meaningful alt text.
  • Link is keyboard accessible.
  • Text remains readable on small screens.
  • Spacing and colors use reusable values.

Want to learn this professionally?

Explore practical IT training at Cyber Code Academy.

View Academy Courses