Mark a single key the user presses.
Acceptance criteria
- 1.Mark a single key the user presses.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <kbd> Tag chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “The tag represents keyboard input entered by the user. Browsers typically display text in a monospace (typewriter-style) font to differentiate it from normal text. It is commonly used in tutorials, documentation, and instructions to show keys or input commands.” .
1.Mark a keyexercise · easy · 10 min
Mark a single key the user presses.
Passes when: Mark a single key the user presses.
2.Mark a shortcutexercise · easy · 10 min · practice plan
Mark two keys of a shortcut.
Passes when: Mark two keys of a shortcut.
3.Mark typed inputexercise · easy · 10 min · practice plan
Mark text the user types.
Passes when: Mark text the user types.
4.A key in a listexercise · easy · 10 min · practice plan
Put a key inside a list item.
Passes when: Put a key inside a list item.
5.A shortcuts tableexercise · medium · 10 min · practice plan
Build a table row with a shortcut and its action.
Passes when: Build a table row with a shortcut and its action.
6.Fix the key left as plain textbug fix · easy · 8 min
Keys the user presses are kbd.
Passes when: Keys the user presses are kbd.
7.Fix the second key not markedbug fix · easy · 8 min · practice plan
Both keys in the shortcut are kbd.
Passes when: Both keys in the shortcut are kbd.
8.Fix code used for typed inputbug fix · easy · 8 min · practice plan
What the user types is kbd, not code.
Passes when: What the user types is kbd, not code.
9.Fix the bold used for a keybug fix · easy · 8 min · practice plan
A key is kbd, not bold text.
Passes when: A key is kbd, not bold text.
10.Fix the key outside the table cellbug fix · easy · 8 min · practice plan
The shortcut belongs in its own cell.
Passes when: The shortcut belongs in its own cell.
Between them these tasks cover Keyboard input, Shortcuts and kbd vs code.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.