How to Post Code in Discord with Color (2020) – Discord TIPS

How to Post Code in Discord with Color (2020) – Discord TIPS

Spread the love

 

In this article, you will learn how to post code in discord for a single line and multiple line code blocks on both PC and Phone.

 Discord code blocks are an advanced text formatting that is used with the discord syntax codes ` backtick keys .

Code blocks are a feature of Discord markdown which can be used by the developer to highlight their code in blocks.

YOU MIGHT BE A DEVELOPER who wants to send the code.

 

How to Post Code in Discord PC

Here you will learn how to write code in discord PC for single line block and multiple line blocks.

For Single Line Code Block:

For just one line small word or phrase

  • Open your Discord dashboard, discord app, or discord web.
  • Navigate to the server, channel, or to any specific user to whom you want to send the discord code.
  • Now as you want to use single line block which means your variable must be short like Echo = single line code block
discord code block
discord syntax codes
  • So for this code, you need to type 1 backtick before and after the text code. Backtick key is found at the very left-hand top just below the Esc key.
backtick key
backtick key
  • So finally our text will be `Echo = single line code block`. Press Enter and now your text has been posted in single line code.
How to post code in discord
How to post code in discord

 

 

For Multiple line Code Block: –

If your code occupies many lines like posting any sample of java or CSS code, you can use this block by adding 3 backticks before and after the word or phrase.

  • Navigate to the Discord server, channel, or to any specific use whom you want to send this sample of code.
  • Here we will take an example of PHP code

<?PHP                                                                                                                                                                $total discord server = 22:                                                                                                                                           Switch($total discord server) {                                                                                                                                         Case 19:                                                                                                                                                             echo “You are Eligible”;

  • So now we will add 3 backticks “`before and after the text and hit Enter to send.
how to write code in discord
how to write code in discord

                              

Also Read:- How to Post GIFs in Discord

 

How to Post Code in Discord Phone

Posting a single line or multiple blocks in the Discord phone app is as simple as in PC.

You need to use the same Discord syntax codes for the block which is 1 `backtick for single line and 3 “`backticks for multiple code block.

What you need to do is to find the backtick key on your phone, let me help you to find it.

iPhone:- 

  • Open discord server, channel, or user where you want to send the code.
  • Tap on the chatbox to open the keypad
  • Tap 123 key which is at the very left-hand bottom corner, this will display the symbol where you can search for ` backtick.
how to find backtick key in iphone
how to find backtick key in iPhone

 

Android:-

  • Navigate to discord user, channel or server to whom you want to send the code
  • Tap on the chatbox to bring the keypad
  • Tap !#1 key which is at the very left-hand bottom corner
  • Now you may find the `backtick key here if not, tap on 1/2 key which is just above the !#1.

Rest you need to follow the same instruction as you read for Discord PC.

how to use backtick key on android
how to use backtick key on android

 

Also Read:-  How to Test Voice on Discord

 

How to Post Code Blocks with Color in Discord  

You can make your code block text more attractive by putting colors on it.

Unfortunately, this feature is only available for PC and for multiple code blocks. You won’t be able to use this on your phone.

To use color for code block text you need to add color code after the “` backticks. For example, if you want to send a text “I love Discord Tips” in Red Color

We will add  

“`DIFF

-I love Discord Tips

“`

Enter                                    

How to Post Code Blocks with Color in Discord
How to Post Code Blocks with Color in Discord

 

Now our Code Block text will look like

-I love Discord Tips

There is much other Discord color syntax which you can try to use different colors

 

 

FINAL WORDS

So far you learned how to post code in discord PC and Phone and how to use color with discord code blocks.

I strongly recommend you to try 2 or 3 times in case you fail to convert into the block, this will even make a practice for you.

Do the same for color syntax and share this article on your server and Facebook to let the people know how to use it.

If you have any other query please let me know in the comment box


Spread the love

Leave a Reply