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

Markdown
| Syntax      | Description |
| ----------- | ----------- |
| Header      | Title       |
| Paragraph   | Text        |
Preview
SyntaxDescription
HeaderTitle
ParagraphText

Use pipes (|) to separate columns and hyphens (-) to create headers.

Alignment

Markdown
| Left align | Center align | Right align |
| :---       |    :----:    |        ---: |
| This       | This         | This        |
| column     | column       | column      |
| is         | is           | is          |
| left       | center       | right       |
| aligned    | aligned      | aligned     |
Preview
Left alignCenter alignRight align
ThisThisThis
columncolumncolumn
isisis
leftcenterright
alignedalignedaligned

Use colons (:) to align columns left, center, or right.

Table with Formatting

Markdown
| Command | Description |
| --- | --- |
| `git status` | List all *new or modified* files |
| `git diff` | Show file differences that **haven't been** staged |
Preview
CommandDescription
git statusList all new or modified files
git diffShow 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

Markdown
```
function greet() {
    console.log("Hello World!");
}
```
Preview
function greet() {
    console.log("Hello World!");
}

Use three backticks to create a code block.

With Language Specification

Markdown
```javascript
const user = {
    name: 'John',
    age: 30,
    greet() {
        console.log(`Hello, I'm ${this.name}`);
    }
};
```
Preview
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

Markdown
```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;
}
```
Preview
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

Markdown
Here's a sentence with a footnote. [^1]

[^1]: This is the footnote.
Preview

Here's a sentence with a footnote. 1

Footnotes

  1. This is the footnote.

Use [^identifier] in text and [^identifier]: content for the footnote.

Multiple Footnotes

Markdown
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.
Preview

Here's a sentence with a footnote. 1

Another sentence with a different footnote. 2

Footnotes

  1. This is the first footnote.

  2. 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

Markdown
~~The world is flat.~~ We now know that the world is round.
Preview

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

Markdown
You can combine ~~strikethrough~~ with **bold** and *italic* text.
Preview

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

Markdown
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media
Preview
  • Write the press release
  • Update the website
  • Contact the media

Use - [ ] for unchecked and - [x] for checked items.

Nested Task Lists

Markdown
- [x] Complete project setup
  - [x] Create repository
  - [x] Set up CI/CD
  - [ ] Deploy to production
- [ ] Write documentation
  - [x] API documentation
  - [ ] User guide
  - [ ] Installation guide
Preview
  • 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

Markdown
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.
Preview

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

Markdown
I need to highlight these ==very important words==.
Preview

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

Markdown
H~2~O

X^2^ + Y^2^ = Z^2^
Preview

H2O

X^2^ + Y^2^ = Z^2^

Use ~ for subscript and ^ for superscript (where supported).

HTML Alternative

Markdown
H<sub>2</sub>O

X<sup>2</sup> + Y<sup>2</sup> = Z<sup>2</sup>
Preview

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