This question already has an answer here:

Some answers contain characters that look like keyboard keys, used as e.g. Ctrl+E.

What markup do I need to add to make Ctrl and E look like actual keys?
That's not mentioned in the formatting help.

marked as duplicate by Shadow The Princess Wizard support Sep 7 '17 at 12:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 9
    +1 for adding this to the formatting help (rather than having needed Google to come up with this page). – Jon Schneider Nov 30 '11 at 17:36
  • 3
    I like, when question marked as duplicate has more votes, then original one :-D – Betlista Jan 8 '16 at 12:34
  • 3
    Oh wow, my question got closed as a duplicate ... seven years after asking it! I wonder if there's a badge for that? – Torben Gundtofte-Bruun Sep 8 '17 at 6:00

Use the


tag, like <kbd>Shift</kbd>+<kbd>Enter</kbd> for Shift+Enter.

After this answer was accepted, the <kbd> tag was disabled on Meta. It then still worked on SO, SF and SU. Meanwhile it has been enabled on Meta again as well.

  • 2
    @C. Ross - Jeff felt that people were abusing them. meta.stackexchange.com/questions/1939/… – Brandon Jun 17 '10 at 21:16
  • 4
    Should add this to the FAQ and/or editor help – dplass Jun 17 '10 at 21:27
  • 37
    It doesn't seem to work in comments. :( – David Harkness Jan 16 '13 at 17:41
  • 27
    +1 for adding <kbd> to comments. – Deqing Apr 19 '13 at 3:47
  • Excellent. Very helpful. Just what I wanted to do. – Darth Egregious Nov 19 '14 at 14:19
  • 2
    Is there a way to add arrow keys? – Eoin Jan 27 '15 at 15:24
  • 7
    @Eoin, use html entities for arrow keys. &rarr; inside keyboard tags will show a right arrow. – Brandon Jan 27 '15 at 15:46
  • 3
    I keep returning to this question every few months to remember how to do this. I can't upvote the question again, so I thought to just say "Thanks!" in a comment! Also if anyone is looking for a list of special keyboard characters for a Mac this answer is perfect apple.stackexchange.com/a/55729/31338 – Shanimal Jun 24 '16 at 18:58
  • 1
    I guess kbd is short for keyboard...in case you're slow like me – cambunctious Aug 31 '16 at 14:51
  • 3
    Doesn't work in comments <kbd>Shift</kbd> – P.Brian.Mackey Apr 27 '18 at 18:30

Use the kbd tag: <kbd>Ctrl</kbd>+<kbd>E</kbd>.


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