Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

I'm a Stack Overflow n00b, but I believe it's an invaluable resource, and really has been so far to my deving on different projects.

Anyway, I have seen users write inline code.

In other words, they are in a comment or something like that, and they want to write some code such as $(document).ready(function(){});

Except, instead of having appear as plain text, it appears like this:


Except, inline.

Anyone want to inform me as to how I can get this to work?

share|improve this question

marked as duplicate by Al E., Scimonster, Martijn Pieters support Dec 27 '14 at 17:07

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.

Actually sorry guys, I found it right here:… – Qcom Aug 16 '10 at 3:04
I always thought that was for the code to be placed on a new line, but the button is smart enough to add inline or new line code depending on where your cursor is placed. – Qcom Aug 16 '10 at 3:05
up vote 4 down vote accepted

See , which is linked from …

  • the little [?] icon above the edit area
  • in the editing sidebar where it says full reference »

The specific section you want is the one that says Code Spans

share|improve this answer
It isn't linked to anywhere from the "add comment" form though... Maybe a little ? under the "Add Comment button...? – Shog9 Aug 16 '10 at 3:15
@Shog9 I think it's assumed if you're posting a comment you know the editing syntax, since you have to have written at least one post to 1) get enough rep to comment, or 2) have a post of your own to comment on – Michael Mrozek Aug 16 '10 at 3:28
@Michael: yeah, but there's no indication that you can use the same syntax in comments (the post editor has that little toolbar and preview pane). – Shog9 Aug 16 '10 at 3:47

What my somewhat pedantic friend meant to say was "use backticks" (~ key)

in line this is my code this is my code in line.

update: Since not everyone has an English keyboard layout and the backtick key may be missing, a good alternative is ALT+96 (from numeric keypad) or just copy and paste this: `

share|improve this answer
It's incredible that this answer was missing. And the way you wrote it is even more incredible! – bfavaretto Aug 18 '12 at 3:59
How do you use code tags in comments such as this though. <code>some code</code> doesn't work. EDIT: Figured it out, nvm. – jan Dec 3 '14 at 6:21
@jan haha by using backticks? – boulder_ruby Apr 1 at 0:14

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