Table of Contents
Extended Markdown Syntax
Master advanced Markdown features that extend beyond the basic syntax. These features provide more power and flexibility for complex documents.
Jump to Section
Tables
Create structured data tables with alignment options and formatting.
Basic Table
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
Use pipes (|) to separate columns and hyphens (-) to create headers.
Alignment
| Left align | Center align | Right align |
| :--- | :----: | ---: |
| This | This | This |
| column | column | column |
| is | is | is |
| left | center | right |
| aligned | aligned | aligned |
Left align | Center align | Right align |
---|---|---|
This | This | This |
column | column | column |
is | is | is |
left | center | right |
aligned | aligned | aligned |
Use colons (:) to align columns left, center, or right.
Table with Formatting
| Command | Description |
| --- | --- |
| `git status` | List all *new or modified* files |
| `git diff` | Show file differences that **haven't been** staged |
Command | Description |
---|---|
git status | List all new or modified files |
git diff | Show file differences that haven't been staged |
You can use formatting like bold, italic, and code within table cells.
Tips & Best Practices
- Tables must have a header row with separator row below
- Pipes at the beginning and end of rows are optional
- Column width is automatically adjusted
- Use HTML for complex table structures
Fenced Code Blocks
Create code blocks with syntax highlighting and language specification.
Basic Code Block
```
function greet() {
console.log("Hello World!");
}
```
function greet() {
console.log("Hello World!");
}
Use three backticks to create a code block.
With Language Specification
```javascript
const user = {
name: 'John',
age: 30,
greet() {
console.log(`Hello, I'm ${this.name}`);
}
};
```
const user = {
name: 'John',
age: 30,
greet() {
console.log(`Hello, I'm ${this.name}`);
}
};
Specify the language after the opening backticks for syntax highlighting.
Multiple Languages
```python
def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
print(factorial(5))
```
```css
.highlight {
background-color: yellow;
padding: 10px;
border-radius: 5px;
}
```
def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
print(factorial(5))
.highlight {
background-color: yellow;
padding: 10px;
border-radius: 5px;
}
Different languages will have appropriate syntax highlighting.
Tips & Best Practices
- Most Markdown processors support 100+ languages
- Common languages: javascript, python, css, html, bash, json
- Use "text" or no language for plain text
- Some processors support line numbers and highlighting
Footnotes
Add footnotes to your documents for additional information or citations.
Basic Footnotes
Here's a sentence with a footnote. [^1]
[^1]: This is the footnote.
Use [^identifier] in text and [^identifier]: content for the footnote.
Multiple Footnotes
Here's a sentence with a footnote. [^1]
Another sentence with a different footnote. [^note]
[^1]: This is the first footnote.
[^note]: This is the second footnote with a longer description.
Footnote identifiers can be numbers or words.
Tips & Best Practices
- Footnotes are automatically numbered in order
- Footnote content can be placed anywhere in the document
- Links are automatically created between text and footnotes
- Not all Markdown processors support footnotes
Strikethrough
Strike through text to show deletions or corrections.
Basic Strikethrough
~~The world is flat.~~ We now know that the world is round.
The world is flat. We now know that the world is round.
Use two tildes (~) on each side of the text to strike through.
Combined with Other Formatting
You can combine ~~strikethrough~~ with **bold** and *italic* text.
You can combine strikethrough with bold and italic text.
Strikethrough can be combined with other text formatting.
Tips & Best Practices
- Useful for showing edits and corrections
- Great for todo lists to show completed items
- Part of GitHub Flavored Markdown
- Not supported by all Markdown processors
Task Lists
Create interactive checkbox lists for todos and task tracking.
Basic Task List
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media
- Write the press release
- Update the website
- Contact the media
Use - [ ] for unchecked and - [x] for checked items.
Nested Task Lists
- [x] Complete project setup
- [x] Create repository
- [x] Set up CI/CD
- [ ] Deploy to production
- [ ] Write documentation
- [x] API documentation
- [ ] User guide
- [ ] Installation guide
- Complete project setup
- Create repository
- Set up CI/CD
- Deploy to production
- Write documentation
- API documentation
- User guide
- Installation guide
You can nest task lists by indenting with spaces.
Tips & Best Practices
- Great for project planning and tracking
- Supported in GitHub, GitLab, and many other platforms
- Can be made interactive in supported environments
- Use any character inside brackets for custom states
Definition Lists
Create definition lists for terms and their explanations.
Basic Definition List
First Term
: This is the definition of the first term.
Second Term
: This is one definition of the second term.
: This is another definition of the second term.
First Term : This is the definition of the first term.
Second Term : This is one definition of the second term. : This is another definition of the second term.
Use a colon (:) followed by a space to create definitions.
Tips & Best Practices
- Great for glossaries and terminology
- Not widely supported across all Markdown processors
- Consider using bold text and paragraphs as an alternative
Highlight
Highlight text to draw attention to important information.
Basic Highlight
I need to highlight these ==very important words==.
I need to highlight these ==very important words==.
Use two equal signs (==) on each side to highlight text.
Tips & Best Practices
- Useful for marking important information
- Not supported by all Markdown processors
- Consider using **bold** as a more compatible alternative
Subscript & Superscript
Create subscript and superscript text for mathematical and scientific notation.
Subscript and Superscript
H~2~O
X^2^ + Y^2^ = Z^2^
H2O
X^2^ + Y^2^ = Z^2^
Use ~ for subscript and ^ for superscript (where supported).
HTML Alternative
H<sub>2</sub>O
X<sup>2</sup> + Y<sup>2</sup> = Z<sup>2</sup>
H<sub>2</sub>O
X<sup>2</sup> + Y<sup>2</sup> = Z<sup>2</sup>
Use HTML tags for better compatibility across processors.
Tips & Best Practices
- HTML tags are more widely supported
- Useful for mathematical formulas and chemical equations
- Not all Markdown processors support ~ and ^ syntax