MeshWorld India LogoMeshWorld.

Markdown Cheat Sheet: Syntax, Tables, and Extended Features

(Updated: Jul 14, 2026)
Listen to ArticleAI Speech
~8 min read narration
100%
Markdown Cheat Sheet: Syntax, Tables, and Extended Features

Writing consistent, well-structured documentation requires a solid grasp of markup formatting. Markdown simplifies HTML tag creation by using plain-text characters to structure headings, tables, lists, links, and code blocks. This cheat sheet serves as a comprehensive reference guide for standard Markdown syntax, GitHub-Flavored Markdown (GFM) extensions, and common formatting solutions.


What is the Quick Reference Syntax?

This section provides quick-reference lookup tables for the most frequently used Markdown syntax elements.

Headings

SyntaxOutput
# H1Heading 1 (largest level)
## H2Heading 2
### H3Heading 3
#### H4Heading 4
##### H5Heading 5
###### H6Heading 6 (smallest level)

Always put a single space after #. Most Markdown parsers require it; some are forgiving, but all accept it.

Text Emphasis

SyntaxOutput
**bold** or __bold__bold
*italic* or _italic_italic
***bold and italic***bold and italic
~~strikethrough~~strikethrough (GFM extension)
`inline code`inline code
<mark>highlight</mark>highlighted text (HTML fallback)

Lists

SyntaxWhat it produces
- item or * item or + itemUnordered list item
1. itemOrdered list item
1. item (all 1s)Ordered list — numbers auto-increment
- nestedNested list (indent with 2–4 spaces)
- [x] doneChecked task list item (GFM)
- [ ] todoUnchecked task list item (GFM)

Always put a blank line before the first list item if it follows a paragraph block.

SyntaxWhat it produces
[text](url)Inline link
[text](url "title")Link with hover title
[text][ref]Reference-style link
[ref]: url "title"Reference definition (anywhere in doc)
<https://url>Autolink (GFM)
![alt text](url)Image
![alt](url "title")Image with title
[![alt](img-url)](link-url)Clickable image (image wrapped in link)

Blockquotes

SyntaxWhat it produces
> textBlockquote
>> nestedNested blockquote
> **Note:** textBlockquote with bold label
> continued (blank > between)Multi-paragraph blockquote

Code Blocks

SyntaxWhat it produces
`code`Inline code
```lang (opening fence)Fenced code block with syntax highlighting
``` (closing fence)End of fenced code block
4 spaces indentCode block (original spec, avoid in modern MD)
```diffDiff block (lines starting with +/- colored)

Horizontal Rules & Dividers

Any of these on their own line produces <hr />:

Syntax
---
***
___

Put blank lines before and after to avoid being parsed as a heading underline.

Escaping Special Characters

Prefix any Markdown special character with a backslash \ to render it literally:

Escaped SyntaxRenders as
\**
\##
\[[
````
||
\!!

Special characters that can be escaped: \ * _ {} [] () # + - . !


How to Use Fenced Code Blocks with Language Tags?

Always specify the language after the opening fence. It enables syntax highlighting in GitHub, VS Code previews, and static site generators.

MARKDOWN
```javascript
const greet = (name) => `Hello, ${name}!`;
```

```python
def greet(name):
    return f"Hello, {name}!"
```

```bash
echo "Hello, world!"
```

```sql
SELECT name, email FROM users WHERE active = true;
```

For a diff block, lines starting with + render green and lines with - render red:

MARKDOWN
```diff
- const url = "http://example.com";
+ const url = "https://example.com";
```

To show a code fence inside a code fence, use more backticks on the outer fence:

MARKDOWN
````markdown
```js
// this renders as a code block inside the example
```
````

How to Format Tables with Mixed Alignment?

A full GFM table uses hyphens for headers and pipes to separate columns. You can customize text alignment by adding colons to the separator row.

MARKDOWN
| Name       | Role      |   Salary |
| :----------| :-------: | -------: |
| Alice      | Engineer  |   $95,000 |
| Bob        | Designer  |   $88,000 |
| Carol      | Manager   |  $110,000 |

Renders as:

NameRoleSalary
AliceEngineer$95,000
BobDesigner$88,000
CarolManager$110,000

What are the GitHub-Flavored Markdown (GFM) Extensions?

GFM is GitHub’s superset of CommonMark. It is widely supported by static site engines (including this site via remark-gfm).

  • Task lists: Rendered as checkbox lists.
    MARKDOWN
    - [x] Write the README
    - [ ] Write tests
  • Strikethrough: Wrapping text in double tildes ~~ renders as strikethrough.
  • Autolinks: Bare URLs and email addresses become clickable without brackets (e.g. https://example.com).

How do I Use Footnotes in Extended Markdown?

Footnotes are supported in GitHub, Obsidian, and many static site generators.

MARKDOWN
Here is a sentence with a footnote.[^1]

[^1]: This is the footnote content. It will render at the bottom of the page.

How does Markdown Behavior Vary Across Parsers?

Different applications parse Markdown differently. Here is a feature availability breakdown:

FeatureCommonMarkGFM (GitHub)MDX (Astro)Obsidian
TablesNoYesYes (via remark-gfm)Yes
Task listsNoYesYesYes
StrikethroughNoYesYesYes
FootnotesNoYesRequires pluginYes
JSX ComponentsNoNoYesNo
Callout directivesNoNoYes (via plugin)Yes

For this site, all GFM extensions are supported, and JSX components work in .mdx files.


Summary Checklist

  • Use ATX style headings (#) with a single space.
  • Format emphasis with asterisks (* and **) or GFM tildes (~~).
  • Build GFM tables using pipes and hyphens with colon alignment.
  • Frame code blocks with triple backticks and language tags.
  • Separate blocks (lists, tables, dividers) with blank lines.

Frequently Asked Questions

Can I write standard HTML tags inside Markdown?

Yes. Most Markdown parsers support inline HTML fallbacks. You can write tags like <u>underlined</u> or <img width="100"> directly in your document.

How do I write multi-line footnotes?

To span a footnote over multiple paragraphs, indent the subsequent paragraphs with four spaces or a tab under the footnote definition.

Can I combine MDX components inside GFM tables?

No. Standard markdown tables do not render JSX or MDX components inside cells reliably. Use HTML <table> syntax if you need interactive elements inside columns.


Reader Quality Feedback

Did this technical guide help solve your problem?

Suggest Errata ($0)
Vishnu
Primary Author

Vishnu

Founder & Principal Architect at MeshWorld. Senior engineer and instructor specializing in AI agent systems, scalable web architecture, and modern development workflows.

Explore Author Archive
Compute Fuel & Open Testbed
100% Independent & Verified

Fuel High-Density, Zero-Fluff Engineering Deep-Dives

Every guide on MeshWorld is validated on physical Linux nodes and reproducible testbeds. If this article saved you hours of debugging or unblocked production, consider funding our next cluster run.

Weekly Dispatch

Join MeshWorld Dispatch

Get practical tutorials, system blueprints, and curated AI engineering notes straight to your inbox. No fluff, zero spam.

Zero spam. 1-click unsubscribe anytime.Prefer RSS?
Curated Continuations

Up Next in This Domain.

Browse Full Archive