How to Format Text As Code on Discord

Table of contents:

How to Format Text As Code on Discord
How to Format Text As Code on Discord
Anonim

This article explains how to create a line or block of code in Discord chat. You can do this on the desktop and mobile versions of the program.

Steps

Method 1 of 2: On Desktop

Format Text as Code in Discord Step 1
Format Text as Code in Discord Step 1

Step 1. Open Discord

Click on the program icon, which features the white app logo on a purple background. The Discord chat window you are connected to will open.

If you are not logged in, enter your email, password and click Log in.

Format Text as Code in Discord Step 2
Format Text as Code in Discord Step 2

Step 2. Select a channel

Click on the one in which you want to write the message in the upper left part of the window.

Format Text as Code in Discord Step 3
Format Text as Code in Discord Step 3

Step 3. Click on the text field

You'll find it at the bottom of the Discord window.

Format Text as Code in Discord Step 4
Format Text as Code in Discord Step 4

Step 4. Write a backtick (`)

Usually this key is not present on Italian keyboards, so you have to enter it with a combination of keys. Press alt="Image" + 0096 and the backtick will appear in the text field.

If you want to create a code block, skip this step and the next three

Format Text as Code in Discord Step 5
Format Text as Code in Discord Step 5

Step 5. Write the text to be formatted

Type the word or phrase you want to insert as a line of code.

Format Text as Code in Discord Step 6
Format Text as Code in Discord Step 6

Step 6. Insert another backtick

You should now see one of these characters on either side of the text you want to send as a code.

For example, if you are trying to apply the desired format to the phrase "Long live mom", you should read in the text field `Long live mom`

Format Text as Code in Discord Step 7
Format Text as Code in Discord Step 7

Step 7. Press Enter

The message will be formatted and sent.

Format Text as Code in Discord Step 8
Format Text as Code in Discord Step 8

Step 8. Create a block of code

If you want to send a code example (such as an HTML page) to another user on Discord, you can type three backticks (``) before and after the text, then press Enter.

  • For example, to format the code "" as a block, type `` `` `on Discord then press Enter.
  • If you want to set a specific language for the code block, type the three backticks, write the language (e.g. css) in the first line, create a new line, then add the rest of the code before inserting the final three backticks.

Method 2 of 2: On Mobile Devices

Format Text as Code in Discord Step 9
Format Text as Code in Discord Step 9

Step 1. Open Discord

Tap the app icon, which features the white Discord logo on a purple background. If you are logged in to your account, the chat page will open.

Format Text as Code in Discord Step 10
Format Text as Code in Discord Step 10

Step 2. Select a channel

Click on the one where you want to send the message.

Format Text as Code in Discord Step 11
Format Text as Code in Discord Step 11

Step 3. Press the text field

You will see it at the bottom of the screen.

Format Text as Code in Discord Step 12
Format Text as Code in Discord Step 12

Step 4. Type a backtick

You can enter it in various ways, depending on your phone:

  • iPhone: Press 123 in the lower left corner of the keyboard, press and hold the apostrophe above the "Enter" button, then tap the left backtick icon (`) with your finger.
  • Android: Press !#1 at the bottom left of the keyboard, then hold down the apostrophe and select the backtick icon `.
  • If you want to create a code block, skip this step and the next three.
Format Text as Code in Discord Step 13
Format Text as Code in Discord Step 13

Step 5. Write the text to be formatted

Format Text as Code in Discord Step 14
Format Text as Code in Discord Step 14

Step 6. Type another backtick

You should now have one of these characters on both sides of the text.

For example, if you want to code the phrase "Hello world!", Type in the text field `Hello world!`

Format Text as Code in Discord Step 15
Format Text as Code in Discord Step 15

Step 7. Press the "Send" button

Android7send
Android7send

You will see it on the right of the text field.

Format Text as Code in Discord Step 16
Format Text as Code in Discord Step 16

Step 8. If you want to send a code example (such as an HTML page) to another user on Discord, you can type three backticks (`` `) before and after the text, then hit the Send key

  • For example, to format the code "" as a block, type `` `` `on Discord.
  • If you want to set a specific language for the code block, type the three backticks, write the language (e.g. css) in the first line, create a new line, then add the rest of the code before inserting the final three backticks.

Advice

  • Discord accepts various languages that you can activate by writing one of the following codes right after the three backticks when creating a block of code:

    • markdown
    • ruby
    • php
    • perl
    • python
    • css
    • json
    • javascript
    • java
    • cpp (C ++)
  • Creating a block of code can be useful for drawing attention to a piece of text (such as a poem) or for sending multiple lines of code without losing the correct formatting.

Recommended: