This question already has an answer here:

I've seen that the <kbd> element is used in a lot of questions and is used to reference a tag. But I've also seen questions that use [tag:tagname] for the same purpose. They look a little bit different (sometag vs ), but they seem to be used for the same purpose.

When should I use each of these?

marked as duplicate by Robert Longson, Sonic the Inclusive Hedgehog, PeterJ, Ward, TylerH Nov 27 at 22:39

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.

  • @Rob that doesn't have anything about the [tag:tagname] syntax, and it's a discussion rather than support question. – David the third Nov 27 at 16:15
up vote 14 down vote accepted

Use <kbd> for keyboard keys. Caps Lock, Shift, Esc, C

Use [tag:tagname] for tags. ,

Use [meta-tag:tagname] for Meta tags.

Use backticks for inline code.;

If you see a post where keyboard keys have been expressed using tag syntax, edit it to use <kbd> notation. Not only is it good style and consistent, it helps users who may not understand what you are talking about or who are using assistive technology.

In certain contexts, there can be true confusion. Did you mean to talk about - related questions or about the meta key on the Space Cadet Keyboard or in Emacs?

Don't use something for something it's not intended for unless there is no other way to do it or you have a very good reason.

  • 6
    Another reason not to mix them up is that the [tag:tagname] markup actually links to the "Questions tagged [tagname]" page... which makes no sense if you meant to use a <kbd> element. – Robert Cartaino Nov 27 at 2:33

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