Introduction to Markdown

Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents.

Quick look at Markdown syntax

In each page in the wiki, click on the link “Edit this page on Gitlab” at the bottom of the page.

image

You should see a web IDE opened with the page content shown in raw Markdown format

image

Notice that there is no option for headings, images, or links, but only plain text. By specifying the file format to be “.md”, we allows the wiki to transform syntax in Markdown to equivalent rich-text components.

How to edit a Markdown file and preview the result content

In above web IDE, click on the first icon on the top right to open a Preview to the side

image

The IDE would display a preview of the page on the right side, and automatically update the preview content on edit.

List of commonly-use syntax

Please find full list at https://markdownguide.offshoot.io/basic-syntax/ , but following are some most commonly used syntax:

Headings

Adding headings if you want to create table of content for the document

# Heading 1 (Avoid using)
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5

Which would be displayed as

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5

New paragraph

Insert blank line after a section to create a paragraph

This is a paragraph

This is the next paragraph

Which would be displayed as

This is a paragraph

This is the next paragraph

New line

Insert two spaces after a line to indicate a new line. This is different from paragraph syntax since it does not create a gap in between

This is first line.  
This is second line

This is next paragraph

Would be displayed as

This is first line.
This is second line

This is next paragraph

Emphasis

**This text would be bold**
*This text would be italic*
***This text would be bold and italic***
** This text would not be bold, because it has space in front of the text**

Which would be displayed as

This text would be bold
This text would be italic
This text would be bold and italic
** This text would not be bold, because it has space in front of the text**

List

1. Ordered item
2. Ordered item
  1. Indented item
  2. Indented item

- Unordered item
- Unordered item
  - Indented item
  - Intended item

Would be displayed as

  1. Ordered item
  2. Ordered item
  3. Indented item
  4. Indented item
  • Unordered item
  • Unordered item
    • Indented item
    • Intended item

A link consists of two parts, the displayed text and the URL. The displayed text must be wrapped inside a square bracket, and the URL must be wrapped inside a parenthesis.

[This is the text](https://this.is.the.url.com)

Would be displayed as This is the text

Images

A local image file can be added using syntax

![](image_file_you_want_to_include.png)

An image URL can be added using syntax

![](https://url/of/image.jpg)