Markdown is a lightweight markup language that converts plain text to HTML. Invented by John Gruber in 2004, it was designed to be readable as plain text while also being easily converted to formatted HTML. Today it is the default writing format for GitHub READMEs, documentation, Stack Overflow answers, Reddit posts, Slack messages, and countless other platforms. Learning Markdown is one of the highest-leverage writing skills for developers.
Headings and Paragraphs
Headings are created with hash signs: # for H1, ## for H2, up to ###### for H6. Leave a blank line between paragraphs — a single line break within a paragraph is treated as a space, not a new paragraph. This mirrors how HTML block elements work.
Inline Formatting
- Bold: **bold text** or __bold text__
- Italic: *italic text* or _italic text_
- Bold and italic: ***bold italic*** or ___bold italic___
- Strikethrough: ~~strikethrough~~ (supported in GFM)
- Inline code: `code` — rendered in a monospace font
- Links: [link text](https://example.com)
- Images: 
Lists
Unordered lists use -, *, or + as bullet markers. Ordered lists use numbers followed by a period. The actual numbers do not matter — Markdown will render them in sequence regardless. Lists can be nested by indenting with two or four spaces. A blank line before a list item makes it a 'loose' list, which wraps each item in a paragraph tag.
Code Blocks
Inline code uses single backticks: `code`. Code blocks use triple backticks (fenced code blocks) with an optional language identifier for syntax highlighting: ```javascript. Alternatively, indent each line of a code block by four spaces. Fenced code blocks are preferred in modern Markdown because they support language specification and work more reliably with surrounding content.
Tables, Blockquotes, and Horizontal Rules
Tables are a GitHub Flavored Markdown (GFM) extension: columns are separated by |, and the header row is separated from the body by a row of dashes. Colons in the separator row control alignment (left, center, right). Blockquotes use > at the start of a line and can be nested with >>. Horizontal rules are three or more dashes, asterisks, or underscores on a line by themselves.
Escaping Special Characters
To display a character that Markdown would otherwise interpret as syntax — *, _, #, [, ] — prefix it with a backslash: \* displays a literal asterisk. This is only necessary when the character appears in a context where Markdown would interpret it. Inside a code span or code block, no escaping is needed — everything is treated as literal text.