What Markdown is
Markdown is a lightweight markup language created by John Gruber in 2004. The idea is that a plain-text document should be readable as-is, while simple punctuation conventions can be converted into well-structured HTML. Today it is the standard for README files, documentation sites, wikis, issue trackers, chat applications, and static site generators.
Because the original description left many edge cases open, different tools rendered the same text differently. CommonMark, first released in 2014, is a precise specification that most modern renderers follow, and GitHub Flavored Markdown (GFM) extends it with tables, task lists, strikethrough, and automatic links.
Essential syntax
Headings are lines starting with one to six # characters. Paragraphs are separated by a blank line, and this is the rule that surprises most beginners: a single line break inside a paragraph does not start a new line in the output. End a line with two spaces or a backslash, or leave a blank line, when you need a break.
Wrap text in single asterisks or underscores for emphasis and double asterisks for strong emphasis. Links are written as [text](url) and images as . Unordered lists start with -, *, or +, and ordered lists start with a number and a period. Nested lists are created by indenting items under their parent.
Inline code uses single backticks. Code blocks are fenced with three backticks on their own lines, and adding a language name after the opening fence, such as ```json, enables syntax highlighting in most renderers. Block quotes start with >.
GitHub Flavored Markdown extensions
Tables are written with pipes separating columns and a separator row of dashes under the header. Colons in the separator row control alignment: :--- for left, :---: for center, and ---: for right. Cells cannot contain block elements, so keep table content short.
Task lists use - [ ] for an open item and - [x] for a completed one. Strikethrough uses double tildes. Plain URLs are turned into links automatically. Some platforms add further extensions, such as footnotes, emoji shortcodes, Mermaid diagrams, or math blocks, which may not render elsewhere, so check where the document will be published.
Writing documents that render everywhere
Use exactly one top-level heading per document and do not skip heading levels. A clean outline improves navigation, generated tables of contents, and accessibility for screen-reader users. Always add descriptive alt text to images.
Leave a blank line before and after lists, code blocks, and tables. Many rendering differences between platforms disappear when block elements are clearly separated.
Most renderers allow inline HTML, but platforms such as GitHub sanitize it and strip scripts, styles, and many attributes. Prefer pure Markdown when portability matters, and preview the result before publishing. Word counts and reading-time estimates help keep README files and blog posts at a reasonable length.
Markdown in documentation workflows
Because Markdown is plain text, it works naturally with version control. Documentation can live in the same repository as the code, be reviewed in pull requests, and be compared line by line with a diff. A helpful convention is to write one sentence per line, which keeps diffs small and makes review comments precise.
Static site generators and documentation platforms turn folders of Markdown files into complete websites with navigation and search. Many of them support front matter, a YAML block at the top of the file between --- lines that stores the title, date, tags, and other metadata. Keeping that metadata accurate is just as important as the content itself.