A small browser-based typing test that displays a random passage and measures words, errors, accuracy, and time.
Files
index.html— main page and UI markupstyles.css— styles and layoutscript.js— main application logic (timer, input handling, metrics)textDisplay.js— sample passages used by the test
Quick start
- Open the
index.htmlfile in your browser (double-click or use a static server).
Or use the Live Server extension in VS Code.
How it works (short)
- On "Start Test" a random passage from
textDisplay.jsis rendered as individual spans. - Keystrokes are tracked using
keydownand compared against the spans to mark correct/incorrect characters. - Timer counts down from 60 seconds and a completion popup shows final stats.
Copyright (c) 2025 [Abdulrahman ahmed]