Content & DocumentationUpdated: 2026-11-04

Master Markdown Syntax: Headings, Tables, Code Blocks & GFM Extensions

Comprehensive formatting cheat sheet for README.md files, technical documentation, blogs, and GitHub issues.

Markdown is the lightweight markup language created by John Gruber that enables formatting plain text for web rendering. GitHub Flavored Markdown (GFM) extends the standard with tables, task lists, strikethrough, autolinks, and syntax-highlighted code blocks.

Basic Typography & Formatting

Standard text emphasis, headers, and structural elements.

ElementMarkdown SyntaxRendered Output
Heading 1`# Heading 1`Top-level document title
Heading 2`## Heading 2`Major section header
Bold Text`**Strong text**` or `__Strong__`**Strong text**
Italic Text`*Emphasis*` or `_Emphasis_`*Emphasis*
Strikethrough (GFM)`~~Deleted text~~`<del>Deleted text</del>
Inline Code`` `const x = 42;` ```const x = 42;`
Horizontal Rule`---` or `***`Divider line `<hr />`

GFM Tables

Tabular data formatting with column text alignment colons.

Standard Markdown Table with Alignmentmarkdown
| Feature | Left-Aligned | Center-Aligned | Right-Aligned |
| :--- | :--- | :---: | ---: |
| Browser OCR | Client-side | WebAssembly | Free |
| Compression | Zero Upload | In-Browser | 100% Private |
| Audio Trim | Instant | HTML5 Canvas | Unlimited |
Colons on left (`:---`), center (`:---:`), and right (`---:`) control cell alignment.

Lists & Interactive Task Lists (GFM Checklists)

Ordered, unordered, and interactive task checklists.

Task Lists (Checklists in GitHub / GitLab)markdown
- [x] 100% Client-Side Privacy
- [x] Zero Server Uploads
- [ ] Optional local backup
- [ ] Export as static HTML
Render interactive checkboxes in modern Git platforms and markdown previewers.
Nested Ordered & Unordered Listsmarkdown
1. First step
   - Sub-item with 3 spaces indentation
   - Second sub-item
2. Second step
   1. Numbered sub-step
   2. Next numbered sub-step
Indent by 3 or 4 spaces to nest sub-elements cleanly.

Code Blocks with Language Syntax Highlighting

Fenced code blocks with language identifiers for highlight engines (Prism, Shiki, Highlight.js).

TypeScript / JavaScript Code Fencemarkdown
```typescript
interface ToolConfig {
  name: string;
  isClientSide: boolean;
}

export const tool: ToolConfig = {
  name: "DocSwift",
  isClientSide: true,
};
```
Three backticks followed by language slug enable high-contrast syntax highlighting.

Blockquotes & Alerts

Callout styling and nested quotes.

GitHub Style Alert Calloutsmarkdown
> [!NOTE]
> Useful information that users should know, even when skimming.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs user attention to avoid problems.
Supported natively across GitHub, Obsidian, and modern documentation frameworks.

Frequently Asked Questions

How can I convert Markdown directly to sanitized HTML in the browser?

Use DocSwift's free Markdown to HTML converter. It parses Markdown into clean semantic HTML instantly with zero server roundtrips.

How do I add line breaks in Markdown without creating a new paragraph?

End a line with two trailing spaces or an explicit `<br />` tag before hitting Enter.