Reference guide to formatting text in Markdown.
Style | Syntax | Output |
italic | *italic* or _italic_ | italic |
bold | **bold** or __bold__ | bold |
bold and italic | ***bold and italic*** | bold and italic |
bold and nested italic | **bold and _nested italic_** | bold and italic |
strikethrough | ~~strikethrough~~ | |
line | --- or *** or ___ | |
new line | <br> |
To create a heading, add number signs #
in front of a word or phrase. The number of number signs you use should correspond to the heading level.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
For list to work new line must be inserted before the list.
Unordered list
* item 1
* item 2
* item 3
Ordered list
1. item
2. item
3. item
Definition list (PHP Markdown Extra)
term
: definition
: definition
To create a link, enclose the link text in brackets (e.g., [Duck Duck Go]
) and then follow it immediately with the URL in parentheses e.g., (https://duckduckgo.com)
.
[Duck Duck Go](https://duckduckgo.com).
With title attribute
[Duck Duck Go](https://duckduckgo.com "Privacy search engine").
The other way is to enclose it in angle brackets. URLs and email addresses in angle brackets will automatically get turned into links.
<https://www.markdownguide.org>
<fake@example.com>
The syntax for creating images is nearly the same to the one we use for creating links – text that displays to the user is enclosed in square brackets []
followed by URL enclosed in parenthesis ()
.
The only difference between links and images is that images are prefaced with an exclamation point !
.
Inline style

Reference style
![image][logo]
[logo]: /path-to-image/image.png "alt text"
Linking images
[](http://kalkulatori.hr "Return to Homepage")
There must be at least 3 dashes separating each header cell. The outer pipes |
are optional.
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
To horizontally align columns use colons
| Left | Center | Right |
| :----------- | :--------: | ------------: |
| left aligned | centered | right aligned |
Blocks of code are either fenced by lines with three backticks ```
, or are indented with four spaces. However only fenced code blocks (with backticks) support syntax highlighting.
Inline code has backticks around it.
Example with backticks (fenced code block)
```
let x = 'Hello';
function hello() {
console.log(x);
}
hello();
```
To create a blockquote, add a >
in front of a paragraph.
> Dorothy followed her through many of the beautiful rooms in her castle.
For blockquote with multiple paragraphs use following syntax
> Dorothy followed her through many of the beautiful rooms in her castle.
>
> The Witch bade her clean the pots and kettles and sweep the floor.
To display a literal character that would otherwise be used to format text in a Markdown document, add a backslash \
in front of the character.
If the word or phrase you want to denote as code includes one or more backticks, you can escape it by enclosing the word or phrase in double backticks ``
.
``Use `code` in your Markdown file.``