
Markdown Style Guide: Best Practices for Content Creation
A comprehensive guide to writing clean, consistent, and accessible Markdown content. Learn formatting techniques, accessibility tips, and content structure best practices for modern static sites.
Markdown has become the de facto standard for content creation in modern web development. Whether you're writing documentation, blog posts, or technical articles, understanding Markdown best practices ensures your content is readable, accessible, and maintainable.
This style guide covers everything from basic formatting to advanced techniques, helping you create content that works seamlessly across different platforms and devices.
Basic Text Formatting
Headers and Structure
Use header hierarchy to create clear content structure:
# Main Title (H1)## Section Title (H2)### Subsection (H3)#### Minor Heading (H4)##### Small Heading (H5)###### Tiny Heading (H6)Best Practice: Use only one H1 per document and maintain logical hierarchy. Don't skip heading levels.
Emphasis and Strong Text
*This text is italic*_This text is also italic_
**This text is bold**__This text is also bold__
***This text is both bold and italic***___This text is also both___Accessibility Tip: Use emphasis sparingly. Screen readers announce emphasis, so overuse can be distracting.
Lists and Organization
Unordered Lists
- First item- Second item - Nested item - Another nested item- Third itemOrdered Lists
1. First step2. Second step 1. Sub-step 2. Another sub-step3. Third stepTask Lists
- [x] Completed task- [ ] Pending task- [ ] Another pending taskLinks and References
Basic Links
[Link text](https://example.com)[Link with title](https://example.com "Optional title")Reference Links
[Link text][reference-id]
[reference-id]: https://example.com "Optional title"Email Links
[Contact us](mailto:hello@example.com)Best Practice: Use descriptive link text. Avoid "click here" or "read more" as they don't provide context when read out of context.
Images and Media
Basic Image Syntax
Responsive Images
Accessibility: Always provide meaningful alt text. If an image is decorative, use empty alt text: 
Code and Technical Content
Inline Code
Use `console.log()` to output data to the browser console.Code Blocks
```javascriptfunction greetUser(name) { console.log(`Hello, ${name}!`);}```Syntax Highlighting
```html<div class="container"> <h1>Welcome</h1></div>```
```css.container { max-width: 1200px; margin: 0 auto;}```
```bashnpm install package-name```Fenced Code Blocks with Language
```json{ "name": "project", "version": "1.0.0", "dependencies": { "react": "^18.0.0" }}```Tables and Data
Basic Table
| Column 1 | Column 2 | Column 3 ||----------|----------|----------|| Row 1 | Data 1 | Data 2 || Row 2 | Data 3 | Data 4 |Aligned Table
| Left Aligned | Center Aligned | Right Aligned ||:-------------|:--------------:|--------------:|| Left | Center | Right || Data | Data | Data |Complex Table
| Feature | Status | Notes ||:--------|:------:|:------|| Basic Auth | β
Complete | Works with all providers || OAuth 2.0 | π§ In Progress | Expected Q2 2024 || SSO | β Planned | Not yet started |Blockquotes and Callouts
Basic Blockquotes
> This is a blockquote.> It can span multiple lines.>> And include multiple paragraphs.Nested Blockquotes
> This is a blockquote.>> > This is a nested blockquote.> > It can be useful for replies or comments.Blockquotes with Attribution
> The best way to predict the future is to create it.>> β Peter DruckerHorizontal Rules and Separators
---
***
___
- - -
* * *Best Practice: Use horizontal rules sparingly to avoid visual clutter. They work best for major section breaks.
Advanced Markdown Features
Strikethrough
~~This text is crossed out~~Superscript and Subscript
H~2~O (subscript)2^10^ = 1024 (superscript)Highlighting
==This text is highlighted==Footnotes
This is a sentence with a footnote[^1].
[^1]: This is the footnote content.Content Structure Best Practices
1. Use Descriptive Headers
β Bad## Stuff
β
Good## User Authentication Methods2. Keep Paragraphs Short
Break up long paragraphs into digestible chunks. Aim for 2-3 sentences per paragraph on mobile devices.
3. Use Lists for Scannable Content
β BadThe application supports multiple features including user authentication, data validation, error handling, and logging.
β
GoodThe application supports multiple features:- User authentication- Data validation- Error handling- Logging4. Include Table of Contents
For longer documents, consider adding a table of contents:
## Table of Contents- [Introduction](#introduction)- [Getting Started](#getting-started)- [Configuration](#configuration)- [Advanced Usage](#advanced-usage)- [Troubleshooting](#troubleshooting)Accessibility Guidelines
1. Meaningful Alt Text
β Bad
β
Good2. Descriptive Link Text
β Bad[Click here](https://example.com) for more information.
β
Good[Read our complete installation guide](https://example.com) for detailed setup instructions.3. Proper Heading Hierarchy
# Main Title## Section 1### Subsection 1.1### Subsection 1.2## Section 2### Subsection 2.1Platform-Specific Considerations
GitHub Flavored Markdown
- Supports task lists:
- [x] Completed task - Supports tables with alignment
- Supports strikethrough:
~~text~~ - Supports syntax highlighting in code blocks
CommonMark
- More standardized than GitHub Flavored Markdown
- Better cross-platform compatibility
- Supports most basic Markdown features
Static Site Generators
- Many support front matter (YAML, TOML, JSON)
- Some support custom shortcodes or components
- Consider your target platform's specific features
Tools and Resources
Markdown Editors
- VS Code: Built-in preview and extensions
- Typora: WYSIWYG Markdown editor
- Mark Text: Real-time preview editor
- Obsidian: Note-taking with Markdown support
Validation Tools
- markdownlint: Lint Markdown files
- markdown-link-check: Check for broken links
- textlint: Advanced text linting
Online Tools
- Dillinger: Online Markdown editor
- StackEdit: Advanced online editor
- Markdown Live Preview: Real-time preview
Common Mistakes to Avoid
1. Inconsistent Formatting
β Bad- Item 1* Item 2- Item 3
β
Good- Item 1- Item 2- Item 32. Missing Alt Text
β Bad
β
Good3. Poor Link Text
β Bad[Here](https://example.com) is the documentation.
β
Good[Complete API documentation](https://example.com) is available online.4. Inconsistent Header Usage
β Bad# Title### Subtitle## Another Section
β
Good# Title## Subtitle## Another SectionConclusion
Mastering Markdown is about more than just syntaxβit's about creating content that is accessible, maintainable, and user-friendly. By following these best practices, you'll create documentation and content that serves your users well across all platforms and devices.
Remember:
- Consistency is key to maintainable content
- Accessibility should be considered from the start
- Structure helps both humans and machines understand your content
- Testing your Markdown across different platforms ensures compatibility
Start implementing these practices in your next piece of content, and you'll see immediate improvements in readability and maintainability.
This style guide is part of the Quesby project, a privacy-first static site boilerplate. For more resources and examples, visit our GitHub repository.