Responsive Web Design / CSS / Basic CSS
Design a Business CardGive a small profile a clear hierarchy.
Watch Rob build the project, understand what each part is for, then work through the official freeCodeCamp lab at your own pace.
ORIGINAL WALKTHROUGH · 27:27
Watch with Rob.
Pause whenever you want to try a change. You can return to the lesson at any time.
You are signed in, but video access needs attention. Check your account access. Your saved work is kept.
Video walkthroughs are included with an active Code Zone membership. The written lesson and practice are free.
Rob’s original recording accompanies the current project. Follow freeCodeCamp’s current requirements when details differ; these guide topics are not mapped video timestamps.
THE IDEA BEHIND THE BUILD
What this lab teaches
A small card brings several CSS decisions into one compact space. The profile image, person’s name, role, organization and links should feel related without every line competing for equal attention.
Start from the required HTML structure and connect the stylesheet before adjusting the visual details. Width constrains the card, padding creates space inside it and margins position it within the page. Keep the image within its container and check that contact links remain identifiable after you change their default styling.
Build reusable styling hooks
Connect the card’s content roles to classes and an external stylesheet.
Control the box and image
Distinguish width, maximum width, interior padding and exterior margins.
Review reading and interaction
Keep paragraph rhythm consistent and preserve understandable links.

REVIEW THE REQUIREMENTS · THREE CLEAR GOALS
Your route through the lab
These groups are a reading guide to the lab, rather than timestamped chapters of the video.
Structure and connect
Organize the profile, choose an image and link the stylesheet.
Check your understanding: The required content is in order and the CSS file loads.
Explore topic 1Set the visual hierarchy
Apply page defaults, card sizing and spacing.
Check your understanding: You can identify the difference between padding and margin in the rendered card.
Explore topic 4Fit and refine
Constrain the image and review text rhythm and contact links.
Check your understanding: Content stays inside the card and the required links and styles pass the official lab checks.
Explore topic 6SEE HOW THE PARTS FIT
A page with a clear structure
This separate mentor-profile rule demonstrates a constrained, centered card. It uses different classes, dimensions and spacing from the lab’s required business card.
.mentor-profile {
width: 260px;
padding: 24px;
margin: 64px auto 0;
text-align: center;
}content rolesIdentify the person, role and contact detailsbox modelSeparate internal space from outside positioninglinksKeep destinations recognizable and usableThree things to pay attention to
The stylesheet must actually load
A correct rule in an unlinked file has no effect. Check the link path and filename first.
Width is not the whole box
With default content-box sizing, padding adds to the declared content width. Inspect the outer size too.
A style reset can remove a useful cue
If you remove link underlines, preserve another clear indication of interaction and visible keyboard focus.
UNDERSTAND IT HERE · PRACTICE IT THERE
Explore the key concepts
Choose a topic for a plain-English explanation, a separate code example and resources to explore. When you are ready, its button opens the official freeCodeCamp lab. Your official tests and completion stay on freeCodeCamp.
Topic 1Group one person’s information
UNDERSTAND THE IDEA
A container keeps related profile details together so you can style the card as a unit. Class names identify reusable styling hooks; they do not create the content’s meaning by themselves.
What you will do
Review the official container, profile information and order requirements before adding styles.
<div class="mentor-profile">
<p class="mentor-name">Ari Chen</p>
<p>Repair volunteer</p>
</div>What to notice: This is a different profile and class system. Use the lab’s required classes and your own suitable public information.
Resources to explore
Read another explanation or experiment with examples before trying the official lab.
Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.
Topic 2Include a suitable profile image
UNDERSTAND THE IDEA
An image should have a meaningful alternative and a layout that fits its container. A CSS maximum width can prevent a large source image from overflowing a narrow card.
What you will do
Add the profile image and review its source, alternative and required styling hook.
<img class="mentor-photo" src="mentor.jpg" alt="Ari smiling at a workshop bench">What to notice: The source is an illustrative filename, not a hosted picture. Choose an actual image that you have permission to use.
Resources to explore
Read another explanation or experiment with examples before trying the official lab.
Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.
Topic 3Connect content to an external stylesheet
UNDERSTAND THE IDEA
A stylesheet link tells the browser where to load presentation rules. Keeping CSS separate helps reuse styles and avoids confusing stylesheet syntax with HTML markup.
What you will do
Connect the lab’s stylesheet and confirm that its path matches the file name in the editor.
<link rel="stylesheet" href="profile.css">What to notice: This link belongs in head. A stylesheet URL must identify an existing CSS file; it is not the name of a selector.
Resources to explore
Read another explanation or experiment with examples before trying the official lab.
Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.
Topic 4Set the reading defaults
UNDERSTAND THE IDEA
A page-level font gives related text a consistent foundation. A fallback family helps when the preferred font is unavailable, while a background color needs to preserve readable contrast.
What you will do
Apply the official page background and font requirements, then inspect the text against the background.
body {
background-color: #eef3f6;
font-family: Verdana, sans-serif;
}What to notice: This palette and font differ from the lab’s exact requirements. The example teaches default styles, not the finished card theme.
Resources to explore
Read another explanation or experiment with examples before trying the official lab.
Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.
Topic 5Create comfortable card spacing
UNDERSTAND THE IDEA
Width limits the content area, padding creates room inside the box and margins separate it from neighbors. Auto side margins can center a constrained block in its parent.
What you will do
Apply the card dimensions, spacing, alignment and font sizing requested by the lab.
.mentor-profile {
width: 260px;
padding: 24px;
margin: 64px auto 0;
text-align: center;
}What to notice: These values deliberately differ from the business-card task. Compare interior padding with exterior margin before applying the official dimensions.
Resources to explore
Read another explanation or experiment with examples before trying the official lab.
Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.
Topic 6Keep the image within its box
UNDERSTAND THE IDEA
Max-width limits an image relative to its containing block. Pairing it with automatic height normally preserves the source image’s proportions when it becomes narrower.
What you will do
Apply the image sizing required by the lab and inspect whether the image stays inside the card.
.mentor-photo {
max-width: 100%;
height: auto;
}What to notice: Max-width is a ceiling, not an instruction to stretch every small image. Confirm the actual rendered result as well as the declaration.
Resources to explore
Read another explanation or experiment with examples before trying the official lab.
Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.
Topic 7Refine text rhythm and identifiable links
UNDERSTAND THE IDEA
Consistent paragraph spacing helps related contact details read as a group. Removing an underline affects how recognizable a link is, so real interfaces need another clear cue and visible keyboard focus.
What you will do
Complete the paragraph and link rules, then check the required contact links and social-link structure on freeCodeCamp.
.mentor-profile p { margin-block: 8px; }
.mentor-profile a { text-decoration: none; font-weight: bold; }
.mentor-profile a:focus-visible { outline: 2px solid currentColor; }What to notice: These scoped rules and spacing are illustrative. Keep real contact details private when publishing a practice project, and make links recognizable.
Resources to explore
Read another explanation or experiment with examples before trying the official lab.
Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.
READY TO BUILD?
Keep the instructions beside the video.
Start the official lab in a new tab, play the walkthrough here, and pause to make each change yourself. Run freeCodeCamp’s checks before moving on. Write and check your project in the official freeCodeCamp editor.
An independent walkthrough by The Code Zone. Not affiliated with or endorsed by freeCodeCamp. The project and official tests belong to freeCodeCamp; the explanations and visual guide on this page are our companion material.