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?
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this communityNo, 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.
code
means program code or highlighting something?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...