What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Hello everyone,

I'm a stackoverflow 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
Actually sorry guys, I found it right here: meta.stackexchange.com/questions/53209/… –  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

2 Answers 2

up vote 3 down vote accepted

See http://meta.stackoverflow.com/editing-help , 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...? –  Shogging through the snow 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). –  Shogging through the snow 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

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 at 6:21

You must log in to answer this question.

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