CSS typing practice

Practice CSS typing by reading selectors, property names, values, units, and media queries as connected patterns. Copy a small rule deliberately, check the declaration you changed, then use a repeatable HTML/CSS test to work on transitions that interrupt your accuracy.

Language practice guide
In this guide, you’ll practice

Read declaration values → Review responsive rules → Practice a corrected pattern

01 Read the whole CSS declaration—including its value

A colon separates a property from its value, but punctuation alone does not make the value valid. Read the selector, nested function calls, and unit attached to the gap value.

cards.cssCSS · example
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

02 Review a grid that misses its responsive requirements

Show one column at widths up to and including 640px, three equal columns above 640px, and 16px between rows and columns. Assume four children, no competing rules, and no intrinsic-content constraints.

cards.cssCSS · example
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
  }
}
Repair the rules · check the breakpoint too
Which pair of settings meets the column-count and spacing requirements?
Viewport 375px or 640px: 1 column
Viewport 641px or 1024px: 3 columns
Required gap in both cases: 16px

Change only gap and the media query comparison. Leave the other declarations unchanged.

Compare each requirement separately. This is a code-review checkpoint, not a typing-speed assessment.

Read the worked explanation
cards.cssCSS · example
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

A non-zero length needs a unit: gap: 16 is invalid and ignored; gap: 16px supplies the required spacing.

max-width: 640px includes 640px. Above that boundary the three-column base rule applies. A min-width query is valid CSS but applies the override at the wrong widths.

03 Try a five-minute CSS typing drill

Use this as a suggested copying routine, not a speed guarantee. Practice the corrected stylesheet in your editor first; the product test uses its own displayed HTML/CSS snippets. Allow extra time for setup and review.

  1. 01
    1 minute · Scan one CSS transition

    Choose the property-to-value colon, the value-to-unit transition in 16px, the nested repeat/minmax parentheses, or the media query condition. Read the exact character sequence before typing.

  2. 02
    2 minutes · Copy and inspect the corrected rule

    Copy the corrected version in your editor. Compare the unit, min/max prefix, braces, and declaration separators with the reference. Repeat the part you changed instead of retyping the faulty rule. Keep semicolons consistent; the final declaration’s semicolon can be omitted in this block, but including it makes later edits less error-prone.

  3. 03
    2 minutes · Run two 60-second HTML/CSS tests

    Open HTML/CSS mode and select 60 seconds yourself. It includes markup and styles, not a CSS-only test. Note one correction or pause per run and keep the duration fixed; the displayed snippets can change.

Practice in the HTML/CSS test

The available mode combines HTML and CSS. Select 60s for this routine.

Start HTML/CSS test

04 Check the copied CSS and the applied result

For a copying drill, compare the source with the reference. For a styling review, inspect whether the browser accepts the declaration and applies the expected rule. These are different checks: a page can still render when one declaration is ignored.

The grid exercise assumes no competing rules. In a real stylesheet, selector matching, the cascade, and other declarations can also affect the result. Do not assume that every visual mismatch comes from a missing semicolon or a wrong unit.

For the combined HTML/CSS test, record mode, duration, CPM, accuracy, and the transition you noticed. Compare several similar sessions, not a CSS-focused editor drill with a prose score. Check whitespace and error rules before comparing tools.

Understand CPM and WPM for code →

05 Keep learning

MDN: gap →MDN: width media feature →

The layout is a custom example, not a selectable test snippet. The review checks CSS reasoning; the timed HTML/CSS test is separate. Neither a quiz answer nor a typing score measures overall development ability.