Text formatting in markdown usually requires characters at both the beginning and end of the text.
Bold text can be created by surrounding text with either double asterisks or double underscores:
**Bolded text**
__Also bolded text__
Result:
Bolded text
Also bolded text
Italics can be created by surrounding text with either asterisks or with underscores:
*Italicized text*
_Also italicized_
Result:
Italicized text
Also italicized
To create strike-through text, surround the text with ~~double tildes~~
.
Note: on StackExchange this formatting isn't included. Instead use the html tag <s>text</s>
. (In chat you can use ---three hyphens---
.)
Creating ***bold italic*** text is simply a matter of using both
**bold** (two asterisks) and *italic* (one asterisk) at the same time,
for a total of three asterisks on either side of the text you want to format at once.
Creating bold italic text is simply a matter of using both bold (two asterisks) and italic (one asterisk) at the same time, for a total of three asterisks on either side of the text you want to format at once.
You can create a horizontal break to divide your text by placing three (or more) underscores
___
or asterisks
***
or hyphens
---
on their own line.
You can create a horizontal break to divide your text by placing three (or more) underscores
or asterisks
or hyphens
on their own line.
There can be spaces between the characters, and a horizontal rule can be immediately followed by another one:
_ _ _
* * * *
and the spaces don't have to be evenly distributed
* ****
and the spaces don't have to be evenly distributed
Some HTML tags can also be used in Markdown.
<b>bold</b>
bold<i>italic</i>
italic<a href="http://stackoverflow.com/">link</a>
link<kbd>Ctrl</kbd>
CtrlNamed anchors can also be used to allow easier navigation within the document. Note that Stack Overflow Markdown doesn't seem to support this.
<a name="heading"></a>
# Heading 1
Text under the heading
Click on a link like [Go to Heading 1](#heading1) to go to that named anchor.
Text under the heading Click on a link like Go to Heading 1 to go to that named anchor.
x<sub>2</sub>
produces x2
x<sup>2</sup>
produces x2
End a line with two or more spaces to create a line break.
Ending a line with no spaces
or with just one space
doesn't create a line beak.
Use two or more spaces
to create a line break.
Use an empty line to make a new paragraph.
Ending a line with no spaces or with just one space doesn't create a line beak.
Use two or more spaces
to create a line break.Use an empty line to make a new paragraph.