Markdown Basic Syntax
Markdown's basic syntax is simple and easy to learn. This chapter introduces the most commonly used core syntax, allowing you to quickly master the basics of Markdown.
Paragraphs and Line Breaks
Paragraphs
Separate paragraphs with blank lines:
Result:
This is the first paragraph.
This is the second paragraph.
Line Breaks
Add two spaces at the end of a line or use the <br> tag:
Result:
First line Second line
Headings
Use # symbols to create headings, supporting levels 1-6:
Result:
Level 1 Heading
Level 2 Heading
Level 3 Heading
Level 4 Heading
Level 5 Heading
Level 6 Heading
Text Styling
Bold
Use ** or __ to surround text:
Result: This is bold text
Italic
Use * or _ to surround text:
Result: This is italic text
Bold and Italic
Use *** or ___ to surround text:
Result: This is bold and italic text
Strikethrough
Use ~~ to surround text:
Result: This is strikethrough text
Lists
Unordered Lists
Use -, +, or * to create:
Result:
- Item one
- Item two
- Item three
Ordered Lists
Use numbers followed by . to create:
Result:
- First item
- Second item
- Third item
Nested Lists
Use indentation to create nesting:
Result:
- Main item
- Sub-item 1
- Sub-item 2
- Sub-sub-item
Links
Inline Links
Result: Link text
Reference Links
Automatic Links
Result: https://example.com
Images
Basic Syntax
Reference-style Images
Blockquotes
Use > to create blockquotes:
Result:
This is a blockquote. It can have multiple lines.
Nested Blockquotes
Result:
First level quote
Second level quote
Third level quote
Code
Inline Code
Use backticks ` to surround:
Result: This is an inline code example.
Code Blocks
Use three backticks ``` to create:
This is a code block Can have multiple lines
Code Blocks with Syntax Highlighting
Horizontal Rules
Use three or more -, *, or _:
Result:
Tables
Use | and - to create tables:
Result:
Alignment
Result:
Escaping Characters
Use backslash \ to escape special characters:
Result: * This is not italic *
Characters That Need Escaping
Task Lists
Use - [ ] and - [x] to create:
Result:
- Completed task
- Incomplete task
- Another task
Footnotes
HTML Tags
Markdown supports inline HTML:
Result:
Ctrl + C
Common HTML Tags
Text Color
Text Alignment
Superscript and Subscript
Result: H2O, X2
Comments
Comments in Markdown are not displayed:
Quick Reference Table
Practice Exercise
Try creating a document with the following elements:
- A level 1 heading
- An introduction paragraph (including bold and italic)
- An unordered list
- An ordered list
- A blockquote
- A code block
- A link
- A table
Summary
This chapter introduced Markdown's basic syntax, including:
- Headings and paragraphs
- Text formatting (bold, italic, strikethrough)
- Lists (ordered, unordered, nested)
- Links and images
- Blockquotes and code
- Tables and horizontal rules
After mastering these basic syntax elements, you can start using Markdown for daily writing. Next, we will dive deeper into each syntax's detailed usage.
Next: Learn more about Markdown Headings.