Show multiple keys inside one <kbd> tag

Viewed 37

I have a key sequence I want to display in github. Let's just say it's the Konami code.
So, I want the result to be BA.

The way I've done this is by using some extremely long code:

<kbd>↑</kbd><kbd>↑</kbd><kbd>↓</kbd><kbd>↓</kbd><kbd>←</kbd><kbd>→</kbd><kbd>←</kbd><kbd>→</kbd><kbd>B</kbd><kbd>A</kbd>

Is there another way to do this without tons of <kbd>'s and </kbd>'s?

1 Answers

Not really: as shown here, using only one kbd would only include everything, without any separation:

Ctrl + Shift + L

So unless you can add separators inside one kbd sequence, you would need all those kbds you mentioned in your question.

Related