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

  1. First item
  2. Second item
    1. Nested item 2.1
    2. Nested item 2.2
  3. Third item

Task List

  • Completed task
  • Another completed task
  • Incomplete task
  • Another incomplete task

Inline link

Link with title

Reference link

Autolink: https://example.com

Email link: email@example.com


Images

Alt text for image

Image with title


Code

Inline Code

Use console.log() to debug JavaScript.

Code Block (Fenced)

1
2
3
4
5
6
7
8
9
function greet(name) {
console.log(`Hello, ${name}!`);
return {
message: `Welcome, ${name}`,
timestamp: new Date()
};
}

greet('World');
1
2
3
4
5
6
7
8
9
def fibonacci(n):
"""Generate Fibonacci sequence up to n"""
a, b = 0, 1
while a < n:
yield a
a, b = b, a + b

for num in fibonacci(100):
print(num)
1
2
3
4
5
6
.container {
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
1
2
3
4
#!/bin/bash
echo "Hello from shell script"
npm install
npm run build

Code Block with Line Numbers

{linenos
1
2
3
4
5
6
7
8
const express = require('express');
const app = express();

app.get('/', (req, res) => {
res.send('Hello World!');
});

app.listen(3000);

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!