Skip to main content
Version: Winter 2024 SheCodes Program

Markdown Format Introduction

What is Markdown​

Markdown is a lightweight markup language created in 2004 by John Gruber. It allows people to write documents in an easy-to-read, easy-to-write plain text format, then convert them into valid HTML documents.

Advantages of Markdown
  • Easy to learn: Syntax is concise and clear, with a gentle learning curve
  • Plain text: Can be written with any text editor
  • Rich formatting: Supports headings, lists, links, images, and many other formats
  • Cross-platform: Can be read and edited on any device
  • Focus on content: Allows authors to focus on writing rather than formatting

Applications of Markdown in Blog Writing​

  • Quick article writing: No need to worry about complex HTML tags
  • Easy to maintain: Plain text format is convenient for version control and collaboration
  • Good readability: Easy to read even without rendering
  • Flexible conversion: Can be easily converted to HTML, PDF, and other formats

Basic Markdown Syntax​

Heading Syntax​

# Level 1 Heading
## Level 2 Heading
### Level 3 Heading

Paragraphs and Line Breaks​

Leave a blank line between paragraphs. If you want to break a line within a paragraph, add two spaces at the end of the line.

This is the first paragraph.

This is the second paragraph.
This line ends with two spaces.
This creates a line break.

Emphasis Syntax​

*Italic* or _Italic_
**Bold** or __Bold__
***Bold and Italic*** or ___Bold and Italic___

List Syntax​

Unordered lists:

- Item 1
- Item 2
- Sub-item A
- Sub-item B

Ordered lists:

1. First item
2. Second item
3. Third item

Links:

[Link Text](URL "Optional Title")
Example: [Google](https://www.google.com "Google Search Engine")

Images:

![Alt Text](Image URL "Optional Title")

Quote Syntax​

> This is a quote.
>
> This is the second paragraph of the quote.

Code Block Syntax​

```python
def hello_world():
print("Hello, World!")
```

Table Syntax​

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Content 1 | Content 2 | Content 3 |
| Content 4 | Content 5 | Content 6 |

Task List Syntax​

- [x] Completed task
- [ ] Incomplete task
- [ ] Another incomplete task

Horizontal Rule Syntax​

Use three or more -, *, or _:

---
***
___
note

If you need to use more complex formatting in Markdown, consider:

  • Using more native Markdown syntax
  • Appropriately using simple HTML tags
  • Using extended syntax supported by your documentation system