Markdown is portable text, not a single universal format. This guide explains why the same file can render differently across editors, repositories, and documentation sites, then gives you a repeatable preview and review checklist for CommonMark, GitHub Flavored Markdown, tables, task lists, code fences, links, footnotes, HTML, and front matter.
Overview
Markdown began as a lightweight way to add structure to plain text, but most modern tools implement a particular dialect or a set of extensions. CommonMark provides a shared specification for core syntax such as headings, paragraphs, emphasis, lists, block quotes, links, images, and code. GitHub Flavored Markdown (GFM) builds on that foundation with features commonly used in software documentation, including tables, task lists, strikethrough, autolinks, and footnotes.
The practical consequence is simple: a file can be valid Markdown and still look different in another renderer. Differences may come from the parser, enabled extensions, HTML sanitization, CSS, link handling, or a documentation platform's preprocessing rules. A Markdown previewer is useful for catching layout problems early, but the most reliable preview is the renderer used by the destination platform.
When reviewing a document, separate three questions:
- Is the source unambiguous? Check indentation, blank lines, list markers, link destinations, and code fence boundaries.
- Does the parser support the syntax? Confirm whether the destination uses CommonMark, GFM, or another dialect.
- Does the rendered page behave correctly? Check styles, anchors, HTML handling, images, and mobile layout in the actual publishing environment.
Checklist by scenario
Writing portable Markdown
Use the common denominator when a document will be read in several tools. Prefer ATX headings such as # Heading, hyphen or asterisk list markers used consistently, fenced code blocks, and standard inline links. Leave a blank line around headings, lists, block quotes, and code blocks when the structure could otherwise be ambiguous.
For maximum portability, avoid relying on tables, task-list syntax, footnotes, raw HTML, and front matter unless the destination explicitly supports them. Keep heading levels in a logical order, use descriptive link text, and do not use indentation as a substitute for structure unless the renderer's rules are known.
Publishing on GitHub or a GFM-compatible destination
GFM is generally a practical choice for README files, issue templates, and project documentation intended for GitHub-like rendering. Before publishing, check:
- Tables have a header row and a delimiter row, with matching cell separators.
- Task-list items use the expected checkbox form, such as
- [ ] Open itemand- [x] Completed item. - Fenced code blocks use a language identifier where syntax highlighting is useful, for example
```js. - Footnote labels are unique, readable, and referenced from the text.
- Links and images use valid destinations and useful alternative text.
- Heading text produces sensible anchors and does not depend on punctuation that may be normalized differently.
Preview the file in the same repository or publishing surface whenever possible. A generic online tool can reveal malformed syntax, but it may not reproduce GitHub's link rewriting, sanitization, styling, or extension behavior.
Maintaining tables and task lists
Tables are convenient for short comparisons, configuration options, and compatibility notes, but they are not ideal for long prose or narrow screens. Keep cells concise, use one idea per row, and check whether embedded Markdown works in the destination. Alignment markers may be supported differently, so treat alignment as presentation rather than essential meaning.
Task lists are useful for release checklists and issue tracking, but a checked box is not always a durable record of completed work. If completion status matters operationally, store it in the system that owns the workflow and use Markdown as a readable view.
Using code fences and examples
Use fenced code blocks for commands, JSON, JavaScript, configuration, and other snippets that must preserve whitespace. Close every fence with the same general delimiter style and place the language identifier immediately after the opening fence. If a code sample contains triple backticks, use a longer fence or choose another delimiter so the example does not terminate early.
Review copied examples for accidental secrets, environment-specific paths, and commands that could be unsafe when pasted. Syntax highlighting is helpful, but it should never be the only signal that distinguishes code from explanatory text.
Using links, footnotes, HTML, and front matter
Reference-style links can make long documents easier to edit, while inline links keep short passages self-contained. Check destinations, fragments, URL encoding, and behavior when links open from the final site. For footnotes, confirm both the reference and definition render correctly and that repeated references behave as expected.
Raw HTML is a common source of differences. Some renderers pass selected elements through, some sanitize them, and others apply different classes or styles. Use HTML only when you have tested the destination and when the document remains understandable if the HTML is removed.
Front matter is usually metadata processed before Markdown rendering, often in a block at the top of a file. It is not part of the universal CommonMark core. Confirm the required delimiters, field names, data types, and placement for the documentation generator or static-site framework you use. A file can display front matter as visible text if it is opened in a renderer that does not preprocess it.
What to double-check
- Parser and extensions: Identify the destination renderer and whether it supports GFM extensions, footnotes, tables, task lists, and strikethrough.
- Whitespace: Check blank lines, trailing spaces used for line breaks, list indentation, nested blocks, and code fence placement.
- Heading structure: Verify that headings are nested logically and that generated anchors are stable enough for internal links.
- Links and images: Test relative paths, case sensitivity, URL characters, fragment links, image dimensions, and alt text.
- HTML and security: Confirm what raw HTML is permitted and whether embedded elements are stripped, escaped, or styled unexpectedly.
- Metadata: Validate front matter separately from Markdown content. Check dates, slugs, tags, layouts, and required fields against the publishing system.
- Responsive layout: Inspect wide tables, long URLs, code blocks, and nested lists on a narrow viewport.
- Source control: Review the rendered diff as well as the Markdown diff. A small source edit can create a large visual change.
A useful workflow is to write in plain Markdown, preview in an editor or online Markdown previewer, render with the project's actual parser in a local build, and then inspect the published page. This layered approach catches both syntax errors and destination-specific behavior.
Common mistakes
- Assuming all Markdown is CommonMark: Tables and task lists are often extensions, not universal core syntax.
- Trusting one preview: A previewer may support features or CSS that the production platform does not.
- Mixing indentation styles: Inconsistent spaces can change nested lists, code blocks, and block quotes.
- Using HTML for layout: Layout-heavy HTML can be stripped or become difficult to maintain across documentation systems.
- Forgetting escaped characters: Characters such as brackets, asterisks, and underscores can become formatting when they were intended as literal text.
- Putting important content in styling: Alignment, color, and syntax highlighting should not carry meaning that plain text does not convey.
- Leaving temporary links or placeholders: Check examples, anchors, images, and reference definitions before release.
When to revisit
Revisit this checklist before publishing a README, release note, API guide, migration document, or major documentation update. Repeat the review when you change editors, Markdown libraries, static-site generators, repository hosts, themes, or build pipelines. It is also worth checking after enabling a new extension, introducing front matter, reorganizing headings, or moving files with relative links.
For a practical release pass, copy the document into the destination environment, compare it with a local or online preview, and inspect the rendered result at desktop and mobile widths. Verify headings, links, tables, task lists, code samples, footnotes, HTML, and metadata one by one. Record any destination-specific conventions in the project's contributor guide so the next author does not have to rediscover them.
Markdown compatibility is not a one-time setting. Treat the parser, publishing platform, and documentation workflow as part of the document's input. When any of those inputs changes, run the checklist again before the content becomes difficult to correct.