Markdown

Updated: 03/06/2020 by Computer Hope
Markdown logo

Markdown is a markup language that formats plain text. The formatted text is then converted into another language, such as HTML (hypertext markup language).

Markdown was developed by John Gruber and Aaron Swartz, and released in 2004. Today, every major blogging platform supports Markdown, and many platforms offer modified versions of Markdown. For instance, GitHub supports GFM (GitHub Flavored Markdown), which more clearly defines characters and white space, and includes special extensions for including GitHub features.

Markdown quick reference

Section headings

Headings are indicated by prefixing a line with between one and six hash marks (#). The resulting text corresponds to the HTML entities <h1> through <h6>.

Including a blank line before a heading is suggested, but not required.

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

In many Markdown renderings, Heading 1 is centered by default.

H1 and H2 can also be indicated by a line, immediately following the heading text, containing only equals signs (=) or dashes (-), respectively.

Heading 1
===
Heading 2
---

Emphasis and strikethrough

Emphasis (italicized text) is indicated by surrounding the text in single asterisks (*text*), or underscores (_text_).

Strong emphasis (bold text) is indicated by surrounding the text in double asterisks (**text**), or double underscores (__text__).

Strikethrough text (text with a horizontal line through the center) is indicated by surrounding the text with two tildes (~~text~~).

Emphases can be combined and can overlap.

*This entire line will be italicized.*
The word **hope** in this sentence will be bold.
The last word in this sentence is displayed as ~~strikethrough~~.
In this sentence, **some text is bold**, _some is italicized_, and 
__*some is both bold and italicized*__.

Lists

Ordered lists are indicated by starting a line with a number and a period. Ordered sub-lists are indented by at least one space. The numbers used don't matter; if they are numbers, the list will be ordered automatically.

Unordered lists are indicated with asterisks (*), pluses (+), or minuses (-), instead of numbers and a period.

Ordered and unordered lists can be mixed, with either being a sub-list of the other.

Paragraphs can be included as list items if they are prefixed with a blank line and preceded by a line break. To skip the line break, add two spaces at the end of the previous line.

1. First ordered list item.
2. Second ordered list item.
 1. First ordered sub-list item.
 2. Second ordered sub-list item.
3. Third ordered list item.
 * First unordered sub-list item.
 * Second unordered sub-list item.
 A paragraph within the second unordered sub-list item.
* First unordered list item.
 1. First ordered sub-list item.
- This is also an unordered list item.
+ So is this.

Links

Hyperlinks are indicated by surrounding the text of the link in brackets, immediately followed by the URL (uniform resource locator) in parentheses.

[Computer Hope](https://www.computerhope.com/)

Code

Code (e.g., snippet of a computer program), is indicated by surrounding the text in backticks (`text`). It's printed in a monospaced font, with syntax highlighting, if the platform supports it.

Multiple lines of code are indicated by a line containing only three backticks, both before and after the code block. Optionally, you can include the name of the programming language after the first three backticks, to specify the syntax highlighting type.

Here, the code `print("Hello, World!")` is monospaced,
with syntax highlighting, if the platform supports it.
The same is true for the following code blocks:
```javascript
a = "Hello, World!";
console.log(a);
```
```basic
10 PRINT "HELLO, WORLD!"
20 GOTO 10
```

Images

Images are indicated with an exclamation mark at the beginning of a line, followed by alternate (hover) text in brackets, followed by the image URL.

![Alternate text](https://www.computerhope.com/logo.gif)

Formatted text, Markup, Markup language, MD, Typography terms