Markdown Syntax Demo
This post demonstrates all Markdown syntax supported by this blog.
Headings
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Text Formatting
Bold text and also bold
Italic text and also italic
Bold and italic and also bold and italic
Strikethrough text
Underlined text
Highlighted text
Text with inline code
Blockquotes
This is a blockquote.
It can span multiple lines.
Nested blockquotes
Are also supported
Even deeper nesting
Lists
Unordered List
- Item 1
- Item 2
- Nested item 2.1
- Nested item 2.2
- Deep nested item
- Item 3
Ordered List
- First item
- Second item
- Nested item 2.1
- Nested item 2.2
- Third item
Task List
- Completed task
- Another completed task
- Incomplete task
- Another incomplete task
Links
Autolink: https://example.com
Email link: email@example.com
Images
Code
Inline Code
Use console.log() to debug JavaScript.
Code Block (Fenced)
1 | function greet(name) { |
1 | def fibonacci(n): |
1 | .container { |
1 |
|
Code Block with Line Numbers
1 | const express = require('express'); |
Tables
| Left Aligned | Center Aligned | Right Aligned |
|---|---|---|
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 |
| Row 2 Col 1 | Row 2 Col 2 | Row 2 Col 3 |
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 |
Complex Table
| Feature | Supported | Notes |
|---|---|---|
| Bold | ✅ | Use **text** |
| Italic | ✅ | Use *text* |
| Strikethrough | ✅ | Use ~~text~~ |
| Highlight | ✅ | Use <mark>text</mark> |
Horizontal Rules
Three or more hyphens:
Three or more asterisks:
Three or more underscores:
Footnotes
Here’s a sentence with a footnote.[^1]
Another sentence with a different footnote.[^2]
[^1]: This is the first footnote.
[^2]: This is the second footnote with more content.
Definition Lists
- Term 1
- Definition for term 1
- Term 2
: Definition for term 2 - Another definition for term 2
Abbreviations
The HTML specification is maintained by the W3C.
*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium
Math (LaTeX)
Inline math: $E = mc^2$
Block math:
$$
\frac{n!}{k!(n-k)!} = \binom{n}{k}
$$
$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$
Emoji
:smile: :heart: :thumbsup: :rocket: :star:
Or use Unicode directly: 😀 ❤️ 👍 🚀 ⭐
Escape Characters
*Not italic*
`Not code`
# Not a heading
[Not a link]
HTML Elements
Click to expand
This content is hidden by default and can be revealed by clicking.
- Hidden item 1
- Hidden item 2
- Hidden item 3
Ctrl + C to copy
superscript and subscript
Alerts/Admonitions
This is a default note.
This is a primary note.
This is a success note.
This is an info note.
This is a warning note.
This is a danger note.
Conclusion
This post covers all the major Markdown syntax elements. Experiment with these in your own posts!