This is a comprehensive list of Markdown syntax along with examples for use in your README.md file, including Mermaid diagrams and code blocks for various programming languages.
- Headings
- Lists
- Links
- Images
- Blockquotes
- Inline Code
- Code Blocks
- Tables
- Horizontal Line
- Bold and Italics
- Mermaid Diagrams
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Unordered List:
- Item 1
- Item 2
- Subitem 2.1
- Subitem 2.2
- Item 3
Ordered List:
1. First item
2. Second item
3. Third item
1. Subitem 3.1
2. Subitem 3.2
- Item 1
- Item 2
- Subitem 2.1
- Subitem 2.2
- Item 3
- First item
- Second item
- Third item
- Subitem 3.1
- Subitem 3.2
[GitHub](https://github.com/)
![Image Alt Text](https://via.placeholder.com/150)
> This is a blockquote.
This is a blockquote.
Inline `code` example.
Inline code
example.
Add ```
at the end of all code blocks Syntax.
JavaScript:
```javascript
function greet() {
console.log("Hello, world!");
}
greet();
Python:
```python
def greet():
print("Hello, world!")
greet()
Shell:
```sh
echo "Hello, world!"
JavaScript:
function greet() {
console.log("Hello, world!");
}
greet();
Python:
def greet():
print("Hello, world!")
greet()
Shell:
echo "Hello, world!"
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Row 1 | Data 1 | Data 2 |
| Row 2 | Data 3 | Data 4 |
Header 1 | Header 2 | Header 3 |
---|---|---|
Row 1 | Data 1 | Data 2 |
Row 2 | Data 3 | Data 4 |
---
**Bold Text**
*Italic Text*
***Bold and Italic Text***
Bold Text Italic Text Bold and Italic Text
Add ```
at the end of all mermaid diagrams Syntax.
Flowchart:
```mermaid
graph TD
A[Start] --> B{Is it?}
B -->|Yes| C[Do something]
B -->|No| D[Do something else]
C --> E[End]
D --> E[End]
Sequence Diagram:
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail...
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
Class Diagram:
```mermaid
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
State Diagram:
```mermaid
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
Entity Relationship Diagram:
```mermaid
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER {
string name
string address
string phone
}
ORDER {
int orderNumber
string date
}
LINE-ITEM {
string productCode
int quantity
float price
}
Gantt Chart:
```mermaid
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2024-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2024-01-12 , 12d
another task : 24d
Pie Chart:
```mermaid
pie
title Key Metrics
"Sales" : 35
"Marketing" : 20
"Development" : 25
"Customer Support" : 20
Git Graph:
```mermaid
gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
Flowchart:
graph TD
A[Start] --> B{Is it?}
B -->|Yes| C[Do something]
B -->|No| D[Do something else]
C --> E[End]
D --> E[End]
Sequence Diagram:
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail...
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
Class Diagram:
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
State Diagram:
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
Entity Relationship Diagram:
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER {
string name
string address
string phone
}
ORDER {
int orderNumber
string date
}
LINE-ITEM {
string productCode
int quantity
float price
}
Gantt Chart:
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2024-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2024-01-12 , 12d
another task : 24d
Pie Chart:
pie
title Key Metrics
"Sales" : 35
"Marketing" : 20
"Development" : 25
"Customer Support" : 20
Git Graph:
gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit