benjaminolsen.dev

Style a readable learning profile

Give the supplied profile a readable visual design using an external stylesheet. Keep its content and links intact while making the page fit a narrow window.

Before starting: m3-l1, m3-l2, m3-l3

Get started

  1. Extract index.html, styles.css and avatar.svg. Connect styles.css from head using a relative stylesheet link.
  2. Set body font-family, a base font size and a unitless line-height. Choose a readable foreground and background.
  3. Apply border-box sizing. Give main a percentage width, a sensible max-width, internal padding and automatic horizontal margins.
  4. Style h1 and h2 with a modest scale. Let text wrap and boxes grow. Make the supplied image fit its container with max-width: 100% and height: auto.
  5. Keep links underlined and preserve visible keyboard focus. Check contrast with the site tool, then test at 200% zoom.
  6. Upload both HTML and CSS and the image to run checks at 320px and 768px.
Start in browser editorDownload starter filesOpen practice checks

Requirements

Manual checks

Hints

Hint 1

A stylesheet file has no effect until the HTML links to it. Check the href first.

Hint 2

Use border-box for predictable widths, then constrain main with width and max-width instead of a fixed large width.

Hint 3

Review the working CSS in lessons 3.2 and 3.3. Choose your own colours and measure them; there is no required colour string.

Explain your decision

Which sizing decision lets padding increase without making the main box overflow?

Compare a practice solution after your attempt

This is one valid solution, not the only design. Compare the structure and behaviour rather than copying the appearance.

Download practice solution