Highlighting text in grey

#1

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.

Thanks,
Joe

#2

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.
#3

@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:
https://www.quora.com/How-do-I-print-a-colored-output-in-C

#4

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.

Thanks,
Joe

#5

Ah that’s what you meant :grin: