Markdown Text Formatting

From WikiOD

Remarks[edit | edit source]

Text formatting in markdown usually requires characters at both the beginning and end of the text.

Horizontal Rules[edit | edit source]

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


Bold[edit | edit source]

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

Italic[edit | edit source]

Italics can be created by surrounding text with either asterisks or with underscores:

*Italicized text*

_Also italicized_

Result:

Italicized text

Also italicized

Strikethrough[edit | edit source]

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---.)

Bold + Italic[edit | edit source]

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.

HTML[edit | edit source]

Some HTML tags can also be used in Markdown.

Named 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.

Heading 1[edit | edit source]

Text under the heading Click on a link like Go to Heading 1 to go to that named anchor.

Subscript/Superscript[edit | edit source]

x<sub>2</sub> produces x2

x<sup>2</sup> produces x2

Line Breaks and Paragraphs[edit | edit source]

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.

Credit:Stack_Overflow_Documentation