Closed jamessampford closed 1 year ago
The correct HTML element for such usage is the kbd
element instead of code
. However the visual result is the same
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd
Interesting, wasn't aware there was an HTML element for it. The MDN example looks nice, though doesn't quite fit the FUI look 😝
Added by #465
A common feature within online systems may be to list keyboard shortcuts (available to use by javascript) or may want to show a field name in a block of code to stand out a little
The below has a couple of examples that could be included when using the
<code>
element with labels:https://jsfiddle.net/b6nhok7m/2/
[I do wonder if the font should be changed as O looks a similar to how 0 looks albeit 0 has the line going through it, also wonder if maybe the padding should be equal]