HTML & CSS Typing Test

Type real markup on its own, then markup with CSS selectors, declarations and layout rules.

Frontend focusedTagsAttributesCSSSelectors

Loading coding passages...

HTML and CSS are typed in two different modes: markup is angle brackets, tag names and quoted attributes; CSS is selectors, braces, colons and semicolons. This test covers both, with ten passages of markup alone and ten that mix markup and styles, so you can practise each and the switch between them.

What you will actually be typing

Two excerpts from the 20 HTML & CSS passages in this test, shown exactly as you type them. Press Enter at the end of each line and the next line’s indentation is filled in for you. Each passage runs to several thousand characters, more than anyone types in five minutes.

Markup: a form, details and a listHTML 1 - Parser Profile Audit
<form class="profile-form" action="/profiles" method="post">
  <label for="profile-owner">Owner</label>
  <input id="profile-owner" name="owner" required />
  <button type="submit">Save profile</button>
</form>

<details class="profile-details-1">
  <summary>Profile Audit notes</summary>
  <p>Status options include verified and draft.</p>
</details>

<ul class="profile-actions-2">
  <li><button type="button">Approve profile</button></li>
  <li><button type="button">Request changes</button></li>
Passage 11: the CSS comes first, then the markup it stylesHTML & CSS 11 - Parser Profile Audit
.profile-parser {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d8d2c8;
  background: #fffdf8;
}

.profile-parser :is(h2, h3) {
  margin: 0;
  font-size: 18px;
}

.profile-parser :is(a, button) {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 6px;
}

@media (max-width: 720px) {
  .profile-parser { grid-template-columns: 1fr; }
}

Who this test is for

Front-end developers, web design students and anyone building pages by hand, especially if your typing slows every time a line fills up with <, >, = and quotes.

Pick passages 1 to 10 if you want markup only, and 11 to 20 to add CSS. In passages 11 to 20 the CSS block comes first, so even a one-minute run includes real selectors and declarations before the markup.

HTML & CSS Typing Test: the test at a glance
Durations1, 2, 3 or 5 minutes
Passages20 HTML & CSS passages, 95,807 characters in all; choose one before you start
DifficultyOne level: every passage is real working code, not graded drills
What countsEvery character and line break must match the passage. Enter fills in the next line’s indentation; Tab inserts two spaces
SpeedGross WPM = characters typed ÷ 5 ÷ minutes. Net WPM takes one word off per error
AccuracyOverall accuracy, plus symbol accuracy: the share of brackets, quotes and operators typed correctly
Report cardSeparate counts for symbol, bracket, quote, semicolon, whitespace and new-line mistakes

The HTML & CSS symbol profile

Across 20 passages and 95,807 characters, HTML and CSS run at 17.2 symbols per 100 characters, the most symbol-heavy test on the site. More than half of all lines (50.8%) start indented, because nested elements are indented under their parents.

Names are short, averaging 5.5 characters, because tag and attribute names are short (p, li, href, class). The difficulty here is symbols, not words.

17.2Symbols per 100 characters
2.6%Indentation
2%Capital letters
5.5Average name length
The most frequent symbols in these passages, per 100 characters typed.
SymbolPer 100 characters
< angle4.3
> angle4.3
" double quote2.4
/ slash2.2
- hyphen1.5
= equals1.2
. dot0.4
, comma0.4

The symbol runs you will type most

</ and =" lead by a long way: every closing tag starts with one and every attribute value with the other. "> closes a tag after its last attribute. Drill those three and most HTML lines feel shorter.

Two or more symbols typed back to back, counted per 1,000 characters of these passages.
RunPer 1,000 characters
</13.9
="11.9
">9.8
><4
.</3.9
></3.8

How HTML & CSS compares with the other coding tests

Measured on each test's own passages. The highlighted column is this page.
MeasureHTML & CSSJavaJavaScriptPythonSQLTypeScript
Symbols per 100 characters17.213.716.914.36.516.1
Indentation, share of characters2.6%3.3%3%8.2%0.1%1.6%
Capital letters, share of characters2%4.4%2.4%0.5%22%4%
Average name length5.5 chars6.9 chars6.2 chars5.8 chars6.3 chars6.5 chars
Average line length37 chars39.1 chars36.6 chars40.3 chars32.6 chars53.4 chars

Typing HTML and CSS: brackets, attributes and declarations

Angle brackets dominate. < and > are the two most frequent symbols here, each about 4.3 per 100 characters, and both need Shift with the right hand. The passages contain 4,140 opening or closing tags in all. Type <, the tag name and > as one movement; the closing tag is the same chord with a slash.

Attributes are the next rhythm: name, equals, quote, value, quote. There are 1,150 quoted attributes in these passages. Practise =" as a single two-key movement, and close the quote before thinking about the next attribute.

Some elements, such as input, have no closing tag; MDN calls them void elements. HTML parsers ignore a trailing slash on them, so <input /> and <input> mean the same thing, but this test is exact: type the slash if the passage shows it.

CSS is a different mode. Each declaration is a property, a colon and a value, declarations are separated by semicolons, and blocks sit inside braces, as MDN’s introduction to CSS syntax sets out. In the mixed passages, the switch from markup to styles is where accuracy usually drops; slow down for the first line of each CSS block.

Anatomy of one line

A single form control. Two quoted attributes, a boolean attribute and a trailing slash: almost every key a typist finds awkward in HTML, in one short line.

  <input id="profile-owner" name="owner" required />
Counted keystroke by keystroke, as the line appears in the passage.
Characters52, of which 2 are indentation
Letters36
Symbols10
Spaces6
Keys that need Shift6

Reading your HTML & CSS report card

Quote errors are the number to watch in HTML: every attribute value is wrapped in double quotes, so a high quote count means attribute rhythm is the thing to practise. Then check overall symbol accuracy, which covers the angle brackets and slashes of every tag.

In passages 11 to 20 the semicolon count becomes meaningful, because CSS declarations end with semicolons. If your semicolon errors rise only on those passages, the switch from markup to CSS is the issue. Whitespace errors are spaces inside a line, usually between attributes; indentation is filled in when you press Enter.

Mistakes the report card will show most

  • Typing the closing tag’s slash in the wrong place: </p> not <p/>.
  • Forgetting the closing quote of an attribute value before the next attribute.
  • A colon where a semicolon belongs at the end of a CSS declaration, or the reverse.
  • Typing a hyphen in a class name as an underscore, or the reverse.

The habits that apply to every kind of typing, such as accuracy before speed and short daily practice, are in how to type faster. For symbols on their own, use the symbol typing test.

A three-step practice plan

The aims below are our suggestions, not pass marks. The test itself has no pass mark; it reports your speed and accuracy and lets you judge the trend.

StepRunAim for
Warm up1 minute on the symbol typing test< > / = " typed without looking
Build2-minute runs on passages 1 to 10 (markup only)No quote errors in the report card
Stretch2- to 5-minute runs on passages 11 to 20 (CSS first)Symbol accuracy of 95% or more across both modes

Frequently asked questions

What happened to the separate HTML/CSS typing test?

It has been merged into this page. The ten HTML/CSS passages are now passages 11 to 20 here, alongside the ten markup-only passages, and the old address redirects to this page.

Do I have to type the slash in <input />?

In this test, yes, if the passage shows it. In real HTML the slash on a void element such as input is optional, because parsers ignore it, but the test compares your typing to the passage character for character.

Should I practise HTML before CSS?

If tags and attributes are still slow, yes: start with passages 1 to 10. Move to 11 to 20 once markup feels automatic, because the mixed passages add the switch between two syntaxes.

How many passages are there?

20: ten of markup only and ten that combine markup and CSS. You can choose any passage and a duration of 1, 2, 3 or 5 minutes before you start.

Is the CSS modern CSS?

Yes. The passages use grid layout, gap, :is() selectors and media queries, alongside ordinary properties such as padding and border.

Why are the class names so long?

They follow a component-name pattern, such as profile-details-1, that is common in real front-end code. The hyphens are part of the practice.

Will typing faster help with front-end work?

It helps with the hand-written parts: markup, styles and templates that editors cannot generate for you. It will not replace knowing what to write, but it removes a lot of friction when you do.

Other coding typing tests

Sources

Conventions cited on this page come from the sources below. Every figure about the passages is measured from the passages themselves, and recalculated each time the site is built.

  1. Void elementMDN Web Docs · link checked 20 Oct 2026
  2. Introduction to CSS syntax: declarations, rulesets, and statementsMDN Web Docs · link checked 20 Oct 2026