How to format text in Discord as code

Author: Marcus Baldwin
Date Of Creation: 16 June 2021
Update Date: 24 June 2024
Anonim
Discord Markdown 101 | Text Formatting & Syntax Guide
Video: Discord Markdown 101 | Text Formatting & Syntax Guide

Content

In this article, we are going to show you how to create line code or block code in Discord chat. This can be done on a computer and a mobile device.

Steps

Method 1 of 2: On the computer

  1. 1 Launch Discord. Click the white Discord logo icon on a purple background. As a rule, it is located on the desktop. The Discord chat window will open if you are already logged in.
    • If you are not already signed in to your account, enter your email address and password, and then click Sign In.
  2. 2 Select a channel. Tap the channel you want to send the message to in the upper left of the window.
  3. 3 Click on the text field of the message. It's at the bottom of the window.
  4. 4 Press the backtick key. This is the character key `which is usually found in the upper left of the keyboard and also has a tilde (~) on it. A single backtick is displayed in the message text box.
    • If you want to format block code, skip this and the next three steps.
  5. 5 Enter the text you want to format. Enter the word or phrase you want to format as a string code.
  6. 6 Press the backtick key again. Now there will be one backtick before and after the text.
    • For example, if you format the string "I like trains", the text box should display `I like trains`.
  7. 7 Click on ↵ Enter. The message will be formatted and sent.
  8. 8 Format the text as block code. If you want to send someone a sample code (such as an HTML page) via Discord, enter three backticks (`` '') before and after the text, and then click ↵ Enter.
    • For example, to format the! DOCTYPE html> code as a block, in Discord enter `` `! DOCTYPE html>` `` and press ↵ Enter.
    • If you want to specify a specific language for the block code, enter three apostrophes, on the first line, enter the language (for example, css), create a new line, enter the rest of the code, and then enter three closing apostrophes.

Method 2 of 2: On a mobile device

  1. 1 Launch Discord. Click the white Discord logo icon on a purple background. It is located on one of the desktops or in the app drawer. The Discord chat window will open if you are already logged in.
  2. 2 Select a channel. Tap the channel you want to send the message to.
  3. 3 Click on the chat text field. It's at the bottom of the screen.
  4. 4 Enter a backtick. This can be done in different ways depending on the device model:
    • iPhone: press 123 in the lower-left corner of the keyboard, press and hold the apostrophe over the Return button, slide your finger to the left to select the backtick character, and then remove your finger from the screen.
    • Android device: tap !#1 at the bottom left of the keyboard, and then click on the symbol ` (backtick).
    • If you want to format block code, skip this and the next three steps.
  5. 5 Enter your text. Enter the text you want to format.
  6. 6 Enter another backtick. Now there will be one backtick before and after the text.
    • For example, if you format the phrase "Hello friends!", The chat field should display `Hello friends!`.
  7. 7 Click on the "Send" icon . It's to the right of the text box.
  8. 8 Format the text as block code. If you'd like to send someone a sample code (such as an HTML page) via Discord, enter three backticks (`` '') before and after the text, and then click Submit.
    • For example, to format the! DOCTYPE html> code as a block, in Discord enter `` `! DOCTYPE html>` `` and press ↵ Enter.
    • If you want to specify a specific language for the block code, enter three apostrophes, on the first line, enter the language (for example, css), create a new line, enter the rest of the code, and then enter three closing apostrophes.

Tips

  • Discord supports multiple languages, which can be activated by entering one of the following codes immediately after three backticks when formatting block code:
    • markdown
    • ruby
    • php
    • perl
    • python
    • css
    • json
    • javascript
    • java
    • cpp (C ++)
  • Formatting block code is useful to draw attention to a piece of text (for example, a poem) or to send a piece of code and still preserve its format.

Warnings

  • If you are using a keyboard other than the standard Android keyboard, look for the backtick on different pages, or hold down the apostrophe to display the backtick.