What Is Markdown?
Markdown is a lightweight plain-text formatting syntax designed to be readable even before it's rendered into HTML.
The core idea behind Markdown
Markdown was designed around a simple principle: formatted text should be readable in its raw, unformatted source form. A Markdown document with `# Heading` and `**bold**` is still perfectly understandable as plain text, unlike raw HTML tags, which clutter the source and require rendering to be legible.
Common syntax at a glance
`#`, `##`, `###` create headings of decreasing size. `**bold**` and `*italic*` apply emphasis. `[link text](url)` creates a hyperlink. Lines starting with `-` or a number create bullet or numbered lists. Backticks create inline `code`, and triple backticks create multi-line code blocks. `>` creates a blockquote, and pipes `|` build simple tables.
Where Markdown shows up
Markdown is the standard for README files and issues on GitHub and GitLab, is the native format for many static site generators and documentation tools, and is used or supported by chat platforms like Slack and Discord for lightweight message formatting.
Rendering safely
Because some Markdown implementations allow raw HTML to pass through, rendering untrusted Markdown directly to HTML without sanitizing the output can expose an application to cross-site scripting (XSS). Any tool or application that renders user-submitted Markdown should sanitize the resulting HTML before displaying it.