How to Use Code Blocks in Discord

Most Discord users type and send their messages without knowing much about coding. After all, you don't need fancy coding to talk to someone else. There are, however, a few benefits to learning the basic codes to make your messages stand out.

Have you ever wondered how others send messages with fancy colored backgrounds? These unusual messages and quotes are possible using code blocks.

Code blocks are codes that make your posts stand out by changing the background. With Markdown, you can go one step further and make formatting changes through simple code usages. However, changing the background is usually enough to get readers to sit up and take notice.

Keep reading to find out how to make your posts stand out from the crowd using code blocks.

What is a code block?

A code block is a section of text in Discord that has a different color. The other color helps the text appear more obvious to all readers and also for aesthetic purposes. A code changes the background surrounding the text, even in the same message.

In other words, text not affected by a code block will appear normal, but text to which you apply a code block will appear different. These code blocks also leave the formatting alone, keeping everything in the same default font.

Code blocks are created by entering backticks at the beginning and end of messages. The '`' button is just below the Esc key and the '1' key is to the left.

If your code block only contains one line of text, you just have to type a backtick at the beginning and end of the text, like this:

Ā« Falcon Punch ! Ā»

Code blocks with more than one line of text require triple backticks. This is what a multi-line code block looks like:




Nice `` 

There are no spaces between triple backticks, and for the first triple backticks in multi-line code blocks, start a new line before typing your message. The "Hello" above will not appear if it is on the same line as the first triple backticks.

It's easy to confuse "Code Blocks" with "Markdown." While both can change how your text appears in Discord chat windows, the former changes the background while the latter deals with text formatting. Now let's see how you can use code blocks on different devices.

How to Use Code Blocks in Discord on PC

Whether you use the Discord client installed on your Windows PC or a browser, the use of the code block is the same. We will first focus on the basic code blocks in these instructions.

  1. Launch Discord on your PC.
  2. Go to any server.
  3. Choose a text channel where you have message permissions.
  4. Move your mouse over the text box.
  5. Enter a backtick.
  6. Type the content of your message.
  7. End the message with a backtick.
  8. Press Enter to send the message.
  9. If you format the code block correctly, you will notice that the text has a different background color than the other messages.
  10. Repeat if necessary.

If you want to enter multi-line blocks of code, these steps are for you.

  1. Go to Discord on your PC.
  2. Head to a server that allows you to type.
  3. Choose a text channel.
  4. Make sure you can type in the text box.
  5. Type three backticks with no spaces between them.
  6. Press Shift + Enter to start a new line.
  7. Type multiple lines of text.
  8. At the end of the last line, type three more backticks.
  9. Send the code block with the Enter key.
  10. If you type everything correctly, you will see a multi-line block of code.
  11. Repeat if desired.

These steps also work on Macs since Discord for macOS is pretty much the same as it is with PC users, so following the above two sets of instructions will also do the trick.

How to Use Code Blocks in Discord on the iPhone App

Discord on iPhone also works with code blocks. This way you don't have to switch devices when you want to send a message with a code to other users.

However, most keyboards on mobile devices do not display the backtick without digging. You'll need to find the backtick on your symbol keyboard, which only takes a few taps. Once you get familiar with its location, typing blocks of code will become second nature on iPhones.

Here's how to use Code Blocks on Discord for iPhone:

  1. Open your Discord app on your iPhone.
  2. Tap the icon for a server that allows typing.
  3. Go to any channel.
  4. Tap the text box to show your keyboard.
  5. Press the symbols button, usually on the left side of the keyboard.
  6. Find the backtick key and press it once.
  7. Type a message.
  8. Finish it off with another backtick.
  9. Send your message to the channel.
  10. The code block will appear if you typed everything correctly.
  11. Repeat if necessary.

Multi-line code blocks also work on iPhone. Here's how to use them:

  1. Launch your Discord app for iPhone.
  2. Go to a server.
  3. Open any text channel you can type.
  4. Bring up your keyboard by tapping the text box.
  5. Find and enter three backticks.
  6. Start a new line by pressing the button below the backspace button.
  7. Enter multiple lines of text.
  8. Finish with three more backticks just after the last line.
  9. Send the message to the channel.
  10. You will see a multi-line block of code if your backticks are formatted appropriately.
  11. Repeat as needed.

Some iPhone users may have backticks in different places if they use third-party keyboards. If your backticks are already showing, you're in luck and you don't have to find them. These instructions were for the default keyboard layouts.

Next, let's talk about performing the same task but on an Android device.

How to Use Code Blocks in Discord on an Android Device

Android phones and tablets can support Discord, and there are even more third-party keyboard apps available. Some may display backticks directly on the first keyboard screen, depending on your settings.

Code blocks also work in direct messages, which means you can emphasize messages you send outside of a public chat.

Here are the steps to use Code Blocks on Android devices:

  1. Launch Discord for Android.
  2. Access one of your servers.
  3. Head to a text channel.
  4. Tap the text box to show your keyboard.
  5. Enter a single backtick.
  6. Type your message and end it with another backtick.
  7. Send your message.
  8. Proper formatting will result in a perfect block of code.

For multi-line code blocks, you'll need to follow these other instructions:

  1. Open the Discord app on your Android phone or tablet.
  2. Tap and open a server.
  3. Go to a text channel that you can type.
  4. Tap the text box and get ready to type.
  5. Type three backticks.
  6. Start a new line and type several lines of text.
  7. Finish with three backticks just after the last line.
  8. Send the text message to the channel and the message with a new background will appear.
  9. You can repeat the process as many times as you want.

Be sure to read this

If you want your text messages to stand out on Discord, code blocks are one of the best ways to do it. They're easy to use, and you'll find yourself typing quickly with enough practice. Just a few more keystrokes, and suddenly you have a message that adds emphasis with no extra effort.

Have you seen any friends using code blocks before reading this? Do you find the various Discord text formatting tips interesting? Let us know what you think in the comments section below.

Audio Video How to Use Code Blocks in Discord
add a comment of How to Use Code Blocks in Discord
Comment sent successfully! We will review it in the next few hours.