Essential storage keeps sign-in and learning features working. Google Analytics measures visits; Microsoft Clarity records interactions to help us improve usability. Both are optional and stay off until you choose. Read our privacy policy.
Style a readable profile card coding exercise | SovranCode
Turn the provided profile markup into a readable card with predictable spacing, a visible keyboard focus state, and a layout that stays usable at narrow widths.
Requirements
Use a readable line-height
Keep the card within the viewport
Give the link a visible :focus-visible outline
Show a hint
Write down the input contract and the failure cases before coding.
live preview
Applies the CSS to a sandboxed preview, the same way course CSS blocks run
RUNTIME OUTPUT
Ready to run the file open above.
LEARN FROM THE SOLUTION
Why the solution works.
The max-width controls line length rather than forcing a fixed card width. Padding and line-height establish comfortable reading space, while focus-visible keeps keyboard feedback visible without adding noise for mouse users.
What this exercise teaches
Box model
Typography
Keyboard focus
A PRACTICAL PLAN
Work through Style a readable profile card with intent.
Translate the contract.Turn the requirements into a short checklist before editing your-solution.css.
Use the example as evidence.Predict the result for the supplied input, then add one boundary case such as an empty value, a limit, or unexpected input.
Review the implementation.Compare your choices against solution.css only after a real attempt.
EXERCISE FAQ
Before you move on.
What does “Style a readable profile card” teach?
This beginner CSS exercise focuses on Box model, Typography, Keyboard focus. Its requirements define the exact behavior to implement before you write code.
How should I validate this CSS solution?
Open your-solution.css and select Run code. The CSS is applied to a sandboxed preview, the same way course CSS blocks run.
When should I open the reference solution?
Attempt Style a readable profile card first. Then open the read-only solution file to compare the contract, edge-case handling, and implementation choices—not simply to copy the final code.