Highlighting text in grey

Ready for a dumb question? I notice that it is the custom to highlight code text in a grey background so it stands out. How is this done? Is there a simple command to do this, or do I have to preformat the text in an editor and paste it?

I’ve been curious about this for some time.


On discuss you mean? That’s code highlighting.
Within a sentence you can surround your word(s) with backticks.

Or for a full block of code / paragraph, indent all lines by four spaces:

Note that there needs to be an empty line just above the code block.

@Joseph_Marrone is this question related to printing in the command line, so e.g. in bash?
If so, they you can look into this:

OK guys, I have the answer. You told me to use the triple quote ( ``` ) which I put in front of and in back of the text. This worked, it highlights all text between the quote marks.


Ah that’s what you meant :grin: