I've noticed an uptick in the use of the inline code span (produced by encompassing the text with ` text `) on our site, mostly for emphasis. But that is not one of its designed purposes. Nor is that usage encouraged. Per this Meta StackExchange question and its accepted answer, inline code spans should only "be used for code (and code-like artifacts)".

I have also been told "It's semantically wrong - the HTML will claim it's code and not regular text - which seriously messes with screen readers". Not a programmer, I can't attest to that though, but I think the more tech-savvy of our community will be able to verify.

For emphasis, we have these handy options to choose from:

  • ""
    The good ol' double quotation mark. 二重引用符

  • ''
    The single quotation mark, usually marking quotes inside another quote. 単一引用符

  • 「」
    Hook/corner brackets for Japanese text. かぎ括弧

  • 『』
    Double hook brackets for Japanese titles and quotes inside another quote in Japanese. 二重鉤括弧

  • Italics and bold
    Easy to use; good results; great bang for the buck.

Example, rather than:

インラインコード means inline code, and is often used to refer to inline code spans.

We should write:

「インラインコード」 means "inline code", and is often used to refer to inline code spans.

  • I was going go ask why it matters for a site where code is not discussed, but then saw the part about "seriously messes with screen readers". I highly recommend emphasizing that part (if it is true) as it seems to be the only reason anyone that is not a programmer should care. Also note that inline code acts as a highlighter which none of the others do. I say this b/c I can see why people would prefer the look of it. Even in your example of what not to do, the highlighted words stand out more than anything but the bold.
    – By137
    Commented Sep 20, 2021 at 15:59
  • 2
    +1 If I may add my own pet peeve: let's not forget the space before and after — although on some devices it looks like the full-width characters already contain extra space, some devices use fonts where these characters are not really full-width, so that omitting the space ends up looking like space is missing... Maybe we can update this answer if the community agrees to try to avoid (ab)using backticks.
    – Earthliŋ Mod
    Commented Sep 20, 2021 at 17:10
  • 1
    I personally totally agree with this post. Features are supposed to be used for its intended purpose. Lack of functionality should be solved in other ways than abusing existing tools. Having said that, if that answer is the established guideline, then the first step should be to update that post.
    – dungarian
    Commented Jan 28, 2022 at 12:40
  • @dungarian I agree... Well, snail always seemed fond of the code span. I have done a lot of editing on the SE sites I frequent, and I convert code spans to blockquotes if they are easily fixable paragraphs. I made a stab at fixing that post, but snail clearly put in a lot of thought and energy to get the important lines to stand out, and it seems pretty difficult to convert them without losing the visual neatness. I will leave it to more skilled people.
    – Eddie Kal
    Commented Jan 28, 2022 at 18:08


You must log in to answer this question.

Browse other questions tagged .