Great question! Markdown is a tool both Reddit, GitHub and Discord use on their platforms. Markdown is defined as:
A plain text formatting syntax aimed at making writing for the internet easier. The philosophy behind Markdown is that plain text documents should be readable without tags messing everything up but there should still be ways to add text modifiers like lists, bold, italics, etc.
How do I use markdown?
There are multiple ways to use markdown. I’ll be going into those today.
Reddit & Discord Usage
These are the easiest so I will go over these first. For these you are just formatting your text as you go along.
Bold Text – If you would like text to appear bolded then you would use two asterisks like so:
**bold text here**. That would show bold text here when you post/send your message.
Italicized Text – If you would like text to appear italicized then you would use one asterisk like so:
*italicized text here*. That would show italicized text here when you post/send your message.
[link text here](https://codinghelp.site)
That would display as: link text here
NOTE: THIS DOES NOT WORK ON DISCORD EXCEPT WITH BOTS.
Strikethrough Text – If you would like to delete/strikethrough text like so then you would use one tilde like so:
~deleted text here~. That would show
deleted text here when you post/send your message.
If you would like to quote text, as shown above you would use 1 greater than sign between each line of text as shown below:
> 1st Quoted Line > 2nd Quoted Line 2nd Quoted Line that continues on another line. > 3rd Quoted Line
That would display the following when you post/send your message:
1st Quoted Line
2nd Quoted Line
2nd Quoted Line that continues on another line.
3rd Quoted Line
Showing Code within the same line – If you are trying to share your
code on Reddit or Discord, this is a great way to do it for extremely short lines. Anything that takes up 1 or 2 lines would qualify for this. Anything more would use the backticks below. To show code within the same line, you would use one backtick on either side of the code like so:
`code here`. That would display like
code here when you post/send your message.
If you have more than 2 lines of code, you will want to use 3 backticks while also stating the type of code you are sharing. For example:
That would display like so when you send your message:
It is important that you put the type of code as both Reddit & Discord have additional formatting they do for the text when they appear on the screen. For example, on Discord, this is how CSS code looks when you don’t add the CSS to after the 3 backticks:
This is how CSS code looks when you do add the CSS tag after the 3 backticks:
If you would like to add an unordered/bulleted list to your post, you would simply use dashes before your list like so:
- 1st Item Here - 2nd Item Here - 3rd Item Here etc.
That would display as:
- 1st Item Here
- 2nd Item Here
- 3rd Item Here
That is all of the code you need to know for Reddit & Discord. Now onto GitHub!
GitHub uses markdown on pages ending with .md which stands for markdown. For example, most (if not all) code shared there is also shared with a README.md file which is what displays on the main page. This is Coding Help Discord Bot’s README.md file on the main page of GitHub:
I used a lot of the same markdown as stated above in the Reddit & Discord section though there are some things I did not add there.
To start off, ordered lists/numbered lists are used like so:
1. First Item Here 2. Second Item Here 3. Third Item Here etc.
That displays like so:
- First Item Here
- Second Item Here
- Third Item Here
Next, there are headers in that README.md file. There are 6 headers you can use starting with
h1 and ending with
h6. To use those headers you would use the following code:
# Header One (biggest Header) ## Header Two ### Header Three #### Header Four ##### Header Five ###### Header Six
That would display like so:
Header One (biggest Header)
They make look a bit different on GitHub but they would display as headers, like above.
You can use markdown in a variety of ways. If you would like to test your knowledge you can go to MarkdownTutorial.com to take their tutorial (hosted on GitHub) to test your knowledge. There are also more items covered there than what I covered here like images and paragraphs. It also links to additional markdown implementations like the following:
If you have additional questions about markdown you can ask them either in the comments below, on Reddit or on Discord.