-30

Can we have back tick code in titles that render in the questions list and the post page? It would be nice to have the fixed width font for actual code snips in a title.

5
  • 4
    titles are also used outside of SO, for example on Google. How does it have impact there?
    – rene
    Feb 27, 2018 at 20:32
  • @rene in the window title bar and search results ie <title> tag can be rendered with backticks. Feb 27, 2018 at 20:33
  • 1
    I don't fancy them simply being rendered. Maybe here in the context of SO it could be tolerated but on Google I don't think seeing ` printf( i++ + ++i); ` would be an awesome experience, as much as I hate the results with [Solved] and other markup noise.
    – rene
    Feb 27, 2018 at 21:03
  • 4
    I can't think of a single code-including title that couldn't be simply made better by explaining the problem at hand rather than showing the example of what's going on. I don't see any reason for titles to include code in the first place, let alone provide markdown for them.
    – Davy M
    Feb 27, 2018 at 22:52
  • 2
    I think this is worth re-evaluating. GitHub recently started supporting code in titles. And I don't think more formatting should be allowed in contrast to the duplicate question. May 19, 2021 at 18:19

1 Answer 1

16

Titles should be descriptive of the problem being attempted to solve. They don't require much in the way of fancy styling or emphasis; they require clarity into the actual problem. Adding formatting - like backticks - does nothing to motivate the goal of making the question any clearer.

7
  • 1
    i disagree, it could make the readability of the titles better to indicate code. Feb 27, 2018 at 20:36
  • 4
    @DanielA.White: Yes, but what good is indicating code in a title if you're explicitly asking about code? Why would backticks make one's question clearer if they're asking about code?
    – Makoto
    Feb 27, 2018 at 20:46
  • 3
    @DanielA.White: If a title is not clear without the formatting, then it's a bad title. Feb 27, 2018 at 22:11
  • 1
    I disagree. When you need to refer e.g. class name in the title, having it in different style would improve readability / make it more understandable. After saying that, I have to agree with BSMP that some people would use backticks for emphasis so allowing backticks to change formatting in titles may not be worth the trouble. Nov 15, 2018 at 14:42
  • 1
    @MikkoRantalainen: If you can't discern from context that what the title is about is a class or method, then the title is unclear and formatting wouldn't save it.
    – Makoto
    Nov 15, 2018 at 15:46
  • 1
    Given the ubiquity of Markdown nowadays, backticks DO actually help me visually scan text to find code (or code snippets)! Mar 14, 2021 at 17:51
  • Let's not forget accessibility tools such as screen readers. Titles with the <code>-HTML tag could actually improve accessibility and SEO. Sep 9, 2021 at 15:06

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