Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 153 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

I know in the question's body, we can use `code` to specify inline code like this.

But can we specify code in the title of the question? And if not, why?

share|improve this question
No formatting is allowed in the title to avoid issues with people trying to make their titles stand out above the others. It would be a sea of My super big important problem .... While moderation works for all-caps titles, style choices would be more argued over. This includes the code tag. Further, we want titles to reflect the question being asked, not the code being exhibited. If you can't convert the code snippet into a suitable english title, you probably need to study the problem more before posting a question about it. – Adam Davis Mar 12 '12 at 5:08
Do you mean code means program code or highlighting something? – Somnath Muluk Mar 12 '12 at 5:15
There shouldn't be enough code in question titles for this to ever matter. If there is, you've written a bad title. – Cody Gray Mar 12 '12 at 7:48
@Cody: Before I learned that it didn't work, I had taken the time to edit posts asking about gettimeofday(2) or other standard functions to include code formatting in the title. (Until a kind moderator fixed my mistake and told me about it..) Since then I've been the one to tell several others. It's always a bit of a surprise... – sarnold Mar 12 '12 at 7:51

No, Markdown isn't run on the title whatsoever. Any special characters get converted to their entities. There's really no need to specify code in the title. If you're using too much code in the title, perhaps you should consider a better title. Normally we'd only see someFunction() or Some_Random_Class listed in the title, which is perfectly readable for the short amount of text present for that line. Inline code in posts is meant to make the code stand out more than anything.

In the body:
It's pretty hard to see those specific functions and classes in that huge block of text above without reading through it. Also, small code snippets such as i + 3 == true would be difficult to spot or even comprehend. The inline code makes it stand out in that you see the formatted box and realize you're starting a piece of code, and that this block of text should be taken as a whole rather than as part of the sentence around it.

In the title:
The text is a lot bigger and limited in size, making it easy to find functions or classes it might be about.

It's pretty easy to determine someFunction() is a keyword in this title, yes?

share|improve this answer
I think OP is talking about highlighting question titles. – Somnath Muluk Mar 12 '12 at 5:14
@Somnath: Inline code (or "highlighting") is part of Markdown, and I've explained why it isn't necessary in titles. – animuson Mar 12 '12 at 5:15
Inline code snippets have nothing to do with highlighting and should not be used that way. – Cody Gray Mar 12 '12 at 7:48

You must log in to answer this question.

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