The Ultimate Markdown Guide
Welcome to your complete guide to Markdown. Markdown is a lightweight markup language with plain-text-formatting syntax. It’s designed so that it can be converted to HTML and many other formats using a tool by the same name. It is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.
Why Use Markdown?
- Simplicity: The syntax is easy to learn and read, focusing on writing rather than complex formatting buttons.
- Portability: As plain text, Markdown files can be opened by virtually any text editor on any device.
- Flexibility: It can be converted into a wide range of formats, including HTML, PDF, and more.
- Platform Support: Widely used on platforms like GitHub, Reddit, Trello, and right here at MarkMind AI!
Basic Syntax
These are the fundamental elements you'll use most often.
Headings
To create a heading, add hash marks (#) in front of a word or phrase. The number of hash marks determines the level of the heading.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Heading 1 | | Heading 1 |
| Heading 2 | | Heading 2 |
| Heading 3 | | Heading 3 |
Paragraphs & Line Breaks
To create paragraphs, use a blank line to separate one or more lines of text. For a simple line break (a <br> tag in HTML), end a line with two or more spaces, then press Enter.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Paragraph | | First paragraph. Second paragraph. |
| Line Break | | First line. |
Emphasis
You can add emphasis to text by making it bold, italic, or both.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Bold | | Bold text |
| Italic | | Italic text |
| Bold & Italic | | Bold and Italic |
| Strikethrough | |
|
Blockquotes
To create a blockquote, add a > in front of a paragraph.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Blockquote | |
|
Lists
You can organize items into ordered and unordered lists.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Unordered List | |
|
| Ordered List | |
|
Code
To denote a word or phrase as code, enclose it in backticks (`).
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Inline Code | | Use |
Horizontal Rules
To create a horizontal rule, use three or more asterisks (***), dashes (---), or underscores (___) on a line by themselves.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Horizontal Rule | |
Links
To create a link, enclose the link text in brackets followed immediately by the URL in parentheses.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Link | |
Images
The syntax for images is similar to links, but with a preceding exclamation mark. Enclose the alt text in brackets, followed by the image URL in parentheses.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Image | | ' d='M4 28V4h6l6 12L22 4h6v24h-6V10l-6 12-6-12v18H4z'/%3e%3c/svg%3e) |
Extended Syntax
These elements extend the basic syntax to include features like tables, fenced code blocks, and more.
Tables
To add a table, use three or more hyphens (---) to create each column’s header, and use pipes (|) to separate each column.
| Element | Markdown Syntax | Rendered Output | ||||||
|---|---|---|---|---|---|---|---|---|
| Table | |
|
Fenced Code Blocks
Create fenced code blocks by placing triple backticks ``` before and after the code block. You can add an optional language identifier to enable syntax highlighting in many renderers.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Fenced Code Block | |
|
Task Lists
Task lists allow you to create a list of items with checkboxes.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Task List | |
|
Escaping Characters
To display a literal character that would otherwise be used for formatting, add a backslash (\) in front of it.
| Element | Markdown Syntax | Rendered Output |
|---|---|---|
| Escaping | | \Without the backslash, this would be a bullet point.\ |