Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Use markdown for documentation

Wednesday, January 20th, 2016 by Servage

markdownMarkdown is a lightweight markup language commonly used in documentation or readme files. It is used to simply format a text using descriptive characters or codes the display software uses to render the content. The benefits of markdown are easy writing in simple text editors and common standards for display of formatted content. You can actually easily read markdown formatted text even in plaintext format, because the markup code also makes good sense in a text only environment.


Regular text paragraphs do not require any special formatting. They are shown as they are, and new lines are respected as such.

This plain text will show as normal text in markdown.


Titles and headings are prefixed with one or multiple hashtags. Use one hashtag for each level of indentation. I.e. one for a level 1 heading, two for a level 2 heading and so on.

# The biggest heading
## The second biggest heading


You can indicate blockquotes like this:

> Pardon my french

Bold and italic

Bold and italic are enclosed with one or two stars.

*This text will be italic*
**This text will be bold**


You can create unordered lists by prefixing each list line with a star or a dash.

* Item 1
* Item 2
* Item 3

- Item 1
- Item 2
- Item 3

Ordered lists

You can create ordered lists by prefixing each list item with a number.

1. Item 1
2. Item 2
3. Item 3

Nested lists

You can combine multiple lists as nested lists like below.

1. Item 1
  1. Subitem 1.1
  2. Subitem 1.2
2. Item 2
  * Subitem 2.1
    * Subitem 2.1.1
    * Subitem 2.1.2
3. Item 3

Code formatting

Inline code formatting allows you to show code surrounded by other text by enclosing it with backticks.

Use the `<img>` tag to include image elements in HTML.

You can also create entire blocks of code by using multiple backtics like below.

$one = 1;
$two = 2;
$result = $one + $two;
echo $result;


Markdown can also show links, which is super useful when creating documents that refer to other content. For this you should enclose the link URL in square brackets and the corresponding link text in regular brackets.

This links goes to [my website]( where you can read more.

The above shows you how easily you can add markdown formatting to your text, and thereby turn dull plain text into great looking content without using a word processor and storing it in a special file format. Markdown is stored as plain text, but if your prefer a better visual oversight when writing markdown, you can also use one of the available markdown editors.

Use markdown for documentation, 5.0 out of 5 based on 4 ratings
Categories: Guides & Tutorials, Tips & Tricks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.