-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
55 lines (52 loc) · 2.05 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="./typespeed.js"></script>
<link rel="stylesheet" type="text/css" href="./typespeed.css"></link>
<title>TypeSpeed: How fast can you type this?</title>
<meta name="description" content="A typing speed calculator using pure JavaScript">
</head>
<body>
<div class="boxes" name="display" id="display" ></div>
<br>
<textarea class="boxes" name="typing" id="type-speed-input" rows="15" cols="80"></textarea>
<table class="metrics">
<tr>
<td>Words
<div class="measurements" name="word-count" id="word-count">0</div>
</td>
<td>
Errors
<div class="measurements" name="error-count" id="error-count">0</div>
</td>
<td>
Mistyped Words
<div class="measurements" name="mistyped-words" id="mistyped-words">0</div>
</td>
</tr>
<tr>
<td>Accuracy
<div class="measurements" name="accuracy" id="accuracy">100%</div>
</td>
<td>Words Per Minute
<div class="measurements" name="wpm" id="wpm">60</div>
</td>
<td>
Time to Completion <div class="measurements" name="typing-time" id="typing-time">(not done)</div>
</td>
</tr>
</table>
<button class="reset-button" id="newTest">Next Test</button>
<div class="boxes" name="instructions" id="instructions" >
Words are counted once you have moved on to the next word.
Errors are counted character by character within words.
Punctuation is counted as part of the word that precedes it.
Mistyped words are counted when you move on to the next word.
Accuracy is counted character by character.
Words per minute is updated each time you type, based on words completed and moved on from since you first started typing. If you stop in the middle of typing for a while, you will need to start a new test to get an accurate word per minute count.
Time to completion is calculated just once, only after you have typed the number of words given in that particular typing test.
</div>
<br>
</body>
</html>