I do not mean this as a recommendation or anything, I just wanted to know whether it is preferred by the site to write certain pieces as code or quote.
In my questions I generally use quote. However I have seen other perople using the quote tag.

Example of code(minecraft):

/give @p minecraft:stone


Example of quote:

This is a quote

Which is better to use when asking questions related to simple codes such as this one.

up vote 23 down vote accepted

Use code markdown for anything that would be a direct input into a computer, be it a program, game, or text file:

  • Code snippets
  • Config files
  • Console Commands
  • File/Folder Paths

Use quote boxes when you are directly quoting someone else:

  • In-game dialogue
  • Another user
  • A Wiki, forum or other website from which you wish to reference (along with providing the link for attribution).

If you are using code or a code excerpt, use the code markdown, that is what it is for. If you are quoting from an article about something, use the quote markdown. If the quote happens to have code in it, you can markdown the code inside a quote like this.

This is an example of such code /give @p minecraft:stone

As you can see, it changes the text font to show the code. You should however try to avoid using code markdown to format text, as text-to-speech programs have a hard time with it. There was a meta explaining the problem of using code markdown with regular text or using quote markdown for code somewhere, but I cannot find it currently.

  • +1 Didn't realise you had already answered, my bad. – Robotnik May 5 '17 at 4:27
  • @Robotnik no worries. sometimes explaining things a different way can help someone understand something better. Never hurts to have multiple helpful people :) – Dragonrage May 5 '17 at 4:28
  • For using a code excerpt, you have to leave a line and then indent four spaces right? So how do you place code inside a quote? – Jawwad Lateef May 5 '17 at 11:38
  • 2
    @JawwadLateef you can also surround the part that is code with a back tic `. Note this is not the same as a single quote/apostrophe. – Dragonrage May 5 '17 at 19:30
  • @Dragonrage Thanks a lot – Jawwad Lateef May 6 '17 at 4:07
  • @JawwadLateef: For quoting a block of code, you enter > followed by five spaces (for the first line). Following lines don’t need the > , just four spaces. – unor May 16 '17 at 2:03

You must log in to answer this question.

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