HTML & CSS Typing Test
Type real markup on its own, then markup with CSS selectors, declarations and layout rules.
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.
<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>.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.
| Durations | 1, 2, 3 or 5 minutes |
|---|---|
| Passages | 20 HTML & CSS passages, 95,807 characters in all; choose one before you start |
| Difficulty | One level: every passage is real working code, not graded drills |
| What counts | Every character and line break must match the passage. Enter fills in the next line’s indentation; Tab inserts two spaces |
| Speed | Gross WPM = characters typed ÷ 5 ÷ minutes. Net WPM takes one word off per error |
| Accuracy | Overall accuracy, plus symbol accuracy: the share of brackets, quotes and operators typed correctly |
| Report card | Separate 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.
| Symbol | Per 100 characters |
|---|---|
| < angle | 4.3 |
| > angle | 4.3 |
| " double quote | 2.4 |
| / slash | 2.2 |
| - hyphen | 1.5 |
| = equals | 1.2 |
| . dot | 0.4 |
| , comma | 0.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.
| Run | Per 1,000 characters |
|---|---|
</ | 13.9 |
=" | 11.9 |
"> | 9.8 |
>< | 4 |
.</ | 3.9 |
></ | 3.8 |
How HTML & CSS compares with the other coding tests
| Measure | HTML & CSS | Java | JavaScript | Python | SQL | TypeScript |
|---|---|---|---|---|---|---|
| Symbols per 100 characters | 17.2 | 13.7 | 16.9 | 14.3 | 6.5 | 16.1 |
| Indentation, share of characters | 2.6% | 3.3% | 3% | 8.2% | 0.1% | 1.6% |
| Capital letters, share of characters | 2% | 4.4% | 2.4% | 0.5% | 22% | 4% |
| Average name length | 5.5 chars | 6.9 chars | 6.2 chars | 5.8 chars | 6.3 chars | 6.5 chars |
| Average line length | 37 chars | 39.1 chars | 36.6 chars | 40.3 chars | 32.6 chars | 53.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 />| Characters | 52, of which 2 are indentation |
|---|---|
| Letters | 36 |
| Symbols | 10 |
| Spaces | 6 |
| Keys that need Shift | 6 |
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.
| Step | Run | Aim for |
|---|---|---|
| Warm up | 1 minute on the symbol typing test | < > / = " typed without looking |
| Build | 2-minute runs on passages 1 to 10 (markup only) | No quote errors in the report card |
| Stretch | 2- 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.
- Void elementMDN Web Docs · link checked 20 Oct 2026
- Introduction to CSS syntax: declarations, rulesets, and statementsMDN Web Docs · link checked 20 Oct 2026