Developer

Markdown Writing Complete Guide: GitHub, Notion, Docs & Technical Writing

Master Markdown for technical writing, README files, documentation, and collaborative tools. Covers syntax, extended features, GitHub Flavored Markdown, tables, code blocks, and best practices.

March 24, 20269 min read

What Is Markdown and Why Do Developers Love It?

Markdown is a lightweight markup language created by John Gruber in 2004 with the philosophy that formatting should be readable as plain text, not cluttered with tags. A Markdown file is just a text file — readable without rendering, editable in any text editor, diffable in version control, and transformable into HTML, PDF, or dozens of other formats.

Developers embraced Markdown quickly because it fits naturally into code workflows: it lives in the same repository as the code, can be reviewed in pull requests, benefits from syntax highlighting, and requires no special software to edit. GitHub made Markdown the standard for README files, issues, pull request descriptions, and wiki pages, cementing its place as the de facto documentation language for software projects.

Core Markdown Syntax

The basic Markdown syntax covers the formatting elements you will use in almost every document. Headings are created with hash symbols: # for H1, ## for H2, ### for H3, up to ###### for H6. Leave a blank line before headings for consistent rendering.

Text emphasis: wrap text in single asterisks or underscores for italic (italic or italic), double asterisks for bold (bold), and triple asterisks for bold italic (bold italic). Strikethrough text (strikethrough) is supported in most extended implementations.

Links use the syntax link text for inline links and [link text][reference-id] with a separate [reference-id]: URL line for reference-style links (cleaner for documents with many links). Images follow the same syntax with a leading exclamation mark: alt text.

Unordered lists use hyphens, asterisks, or plus signs as bullets. Ordered lists use numbers followed by periods. Nest lists by indenting with 2 or 4 spaces. Horizontal rules are three or more hyphens, asterisks, or underscores on a line: ---.

GitHub Flavored Markdown (GFM)

GitHub Flavored Markdown extends the CommonMark specification with features specifically useful for software documentation. The most commonly used GFM extensions are task lists, tables, fenced code blocks with language syntax highlighting, and automatic URL linking.

Task lists create interactive checkboxes in GitHub issues and pull requests: - [x] Completed item and - [ ] Pending item. These are invaluable for tracking progress in issues and PR checklists.

Fenced code blocks use triple backticks with an optional language identifier for syntax highlighting: javascript followed by code and . GitHub supports syntax highlighting for hundreds of languages. Specifying the language is important for both aesthetics and screen reader accessibility.

Tables in GFM use pipes and hyphens: | Column 1 | Column 2 | with | --- | --- | as the separator row. Column alignment is controlled by the position of colons in the separator: | :--- | for left, | :---: | for center, and | ---: | for right.

Writing Effective README Files

The README.md is the front door of every software project. A high-quality README should answer five questions immediately: what the project does (one-sentence summary at the top), why someone should use it (key benefits or use cases), how to install it (clear, copy-pasteable commands), how to use it (a quick example or usage guide), and how to contribute.

Use a project logo or screenshot near the top for instant visual context. Include a badges row (build status, coverage, license, npm version) from services like Shields.io to communicate project health at a glance. Keep the README scannable — most developers skim documentation; use headings, bullet points, and code blocks rather than dense paragraphs.

Documentation as Code

Documentation as Code (DocaC) treats documentation with the same rigor as source code: stored in version control, reviewed in pull requests, tested for accuracy, and deployed automatically. Markdown files are the foundation of this approach.

Popular documentation systems built on Markdown include Docusaurus (Meta), MkDocs, GitBook, and VitePress (Evan You, creator of Vue). These tools generate full-featured static documentation websites from a folder of Markdown files, with search, navigation, versioning, and theming included.

For API documentation, combining OpenAPI YAML/JSON specifications with Markdown narrative pages creates comprehensive developer portals. Gatsby and Astro can build custom documentation sites with MDX — Markdown with embedded JSX components — for maximum flexibility.

Markdown in Collaborative Tools

Beyond code repositories, Markdown has proliferated into productivity and collaboration tools. Notion uses a Markdown-compatible editor where standard syntax works in real time. Slack, Discord, Jira, Linear, and GitHub Issues all support various subsets of Markdown formatting for comments and descriptions.

The productivity advantage is significant: developers who learn Markdown syntax once can format content consistently across dozens of platforms without switching mental models or relearning toolbar buttons. Markdown knowledge transfers directly from GitHub to Confluence to Notion to VS Code documentation comments.

Try It Now — Free Online Markdown Editor

UtiliZest's Markdown Editor gives you a live split-pane editor with real-time preview. Write Markdown on the left, see the rendered HTML output on the right, and copy the HTML or export when ready. No account, no ads — just clean editing.

Try markdown editor Now

Frequently Asked Questions

What is the difference between CommonMark and GitHub Flavored Markdown?
CommonMark is a standardized, rigorously specified version of Markdown that resolves many ambiguities in the original Gruber specification. GitHub Flavored Markdown (GFM) is CommonMark plus additional extensions: tables, task lists, strikethrough, and autolinks. Most modern Markdown processors implement at least CommonMark, and many implement GFM extensions. When writing for GitHub, you have access to the full GFM feature set.
Can I write HTML directly inside a Markdown file?
Yes. Standard Markdown is a superset of HTML — raw HTML tags in Markdown files are passed through to the output unchanged. This is useful for elements that Markdown doesn't support natively, such as <details> expandable sections, custom HTML attributes, <sup> and <sub> tags, and <kbd> keyboard shortcut styling. Some platforms (like GitHub) sanitize certain HTML tags for security.
How do I create collapsible sections in GitHub Markdown?
Use the HTML <details> element, which GitHub renders as a collapsible section: <details><summary>Click to expand</summary>Hidden content here</details>. You can include Markdown formatting inside the details block — just leave blank lines around the Markdown content for it to be parsed correctly.
What is MDX and when should I use it?
MDX is Markdown with embedded JSX (React components). It allows you to write documentation in Markdown while importing and rendering interactive React components inline — like live code playgrounds, interactive demos, or custom alert boxes. MDX is ideal for documentation sites that need both narrative writing and interactive elements. Docusaurus, Astro, and Next.js all support MDX natively.
How do I add anchor links to headings in Markdown?
Most Markdown renderers (including GitHub) automatically generate anchor IDs for headings. The ID is derived from the heading text in lowercase with spaces replaced by hyphens and special characters removed. To link to ## Installation, use [link text](#installation). For headings with spaces and caps like ## Getting Started, the anchor is #getting-started. Use relative links for internal document navigation and absolute URLs for cross-document linking.

Related Posts