How are people showing keyboard "glyphs" on Super User? I looked at the Markdown help page and it didn't show anything regarding this.

Here is an example. (question has been deleted since this was asked, so an archive link is provided instead):

  • 7
    your example link is now broken – Christopher Bottoms Sep 13 '11 at 11:42
  • 1
    A very easy way to find this out would have been click the edit button on a post where you see this and look at their code. – Jasper Dec 21 '12 at 17:38
  • @Jasper: sure, but I was specifically wondering if this was something implemented in stackoverflow's flavor of Markdown. Turned out it was just straight up html – Jorge Israel Peña Dec 22 '12 at 2:03
  • @JorgeIsraelPeña In fact, the "magic" isn't in the html. but in the css and could have been applied to a span just as easily. – Jasper Dec 22 '12 at 5:00
  • @Jasper Ah yes, I misunderstood your first comment (though I made no claims of there being any "magic" or where it was derived from; "straight up html" from the user input perspective). And yeah, that's typically what I do, I guess at the time I didn't have access to the edit link or just didn't think of it or something – Jorge Israel Peña Dec 22 '12 at 8:34
  • They need to be added to the Markdown documentation. – bgoodr Sep 2 '18 at 16:57

You need to use the <kbd> HTML tag:


becomes CTRL+Z

| improve this answer | |
  • 1
    How about to print "Android", "HTML" tag inside the question? Android tag's link is here: stackoverflow.com/questions/tagged/android – Paresh Mayani Nov 8 '11 at 9:54
  • 6
    Note that these don't work in comments but appears as <kbd>CTRL</kbd>. – Deanna Jul 30 '12 at 14:28
  • 2
    Or, now that mid 2012 these sites started being HTML5, the w3.org recommended way would be <kbd><kbd>CTRL</kbd>+<kbd>Z</kbd></kbd>... But yes, that is ugly here! (And yes, it's just a recommendation...) – Arjan Sep 30 '12 at 15:33
  • 20
    Hmm <kbd>kbd stopped working in comments</kbd> – bobobobo Oct 18 '12 at 14:13
  • 3
    @bobobobo HTML isn't allowed in comments :( – Joel Mellon Feb 23 '16 at 16:22

If you want to reference special keys such as ⌘ Command, you can use these special characters:


  • ⌥ Option <kbd>⌥ Option</kbd> <kbd>⌥</kbd>
  • ⌃ Control <kbd>⌃ Control</kbd> <kbd>⌃</kbd>
  • ⇧ Shift <kbd>⇧ Shift</kbd> <kbd>⇧</kbd>
  • ⌘ Command <kbd>⌘ Command</kbd> <kbd>⌘</kbd>
  • ⎋ Escape <kbd>⎋ Escape</kbd> <kbd>⎋</kbd>
  • ⇪ Caps lock <kbd>⇪ Caps lock</kbd> <kbd>⇪</kbd>
  • ⇥ Tab <kbd>⇥ Tab</kbd> <kbd>⇥</kbd>
  • ⏏︎ Eject ⏏︎ <kbd>⏏︎ Eject</kbd> <kbd>⏏︎</kbd>
  • ⌫ Delete <kbd>⌫ Delete</kbd> <kbd>⌫</kbd>

You can always access these symbols via Character Viewer on a Mac:

  1. Edit > Emoji & Symbols Space
  2. You'll find these under the Symbols > ⌘ Technical Symbols list
| improve this answer | |

<kbd> elements are way intrusive For great humor.

| improve this answer | |

Additionally, if you have formatting questions like that, you can look at the source of the post to see what markup was used (by clicking edit).

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .