Markup

Markdown Basics: A Complete Beginner Guide

Learn Markdown from scratch, including headings, emphasis, lists, code, links and images, with plain examples you can start using right away.

On this page
  1. Why People Like Markdown
  2. Headings
  3. Paragraphs and Line Breaks
  4. Emphasis
  5. Lists
  6. Links
  7. Images
  8. Inline Code and Code Blocks
  9. Quotes and Dividers
  10. Tables and Task Lists
  11. Escaping Special Characters
  12. Tools for Writing Markdown
  13. Habits That Help
  14. A Short Practice Exercise
  15. Frequently Asked Questions

Markdown is a way of writing formatted text using only plain characters. You type a few symbols, such as a pound sign for a heading or asterisks around a word for emphasis, and software turns that text into clean formatted output. Because the source is just text, it is light, portable and readable even before conversion.

It is used for notes, documentation, README files, blog posts, forum comments and chat messages. This guide teaches the syntax you will use most, starting from nothing.

Why People Like Markdown

  • It is quick. Your hands never leave the keyboard to reach a toolbar.
  • It is portable. A Markdown file is plain text that opens in any editor on any system.
  • It is future proof. There is no special format to become obsolete.
  • It works well with version control, since changes show clearly line by line.
  • It converts easily to HTML, PDF and other formats.

Headings

Start a line with one to six # characters followed by a space. More characters mean a smaller heading.

# Main title
## Section
### Subsection

Use a single top level heading per document and keep the levels in order.

Paragraphs and Line Breaks

A paragraph is one or more lines of text. To start a new paragraph, leave a blank line. A single line break inside a paragraph is usually joined into one line by the renderer. To force a break, end a line with two spaces or follow the specific rules of your tool.

Emphasis

  • Wrap text in single asterisks for italic: *italic*.
  • Wrap text in double asterisks for bold: **bold**.
  • Combine them for bold and italic: ***both***.
  • Underscores work in place of asterisks in most tools.

Lists

Unordered lists use a hyphen, plus sign or asterisk followed by a space.

- Apples
- Bananas
- Cherries

Ordered lists use numbers followed by a period.

1. Preheat the oven
2. Mix the ingredients
3. Bake

To nest items, indent them by two or four spaces under the parent item. The actual numbers in an ordered list rarely matter, because most renderers number them for you.

A link has text in square brackets followed by the address in parentheses.

[Read the docs](https://example.org/docs)

You can add a title in quotes after the address. For long documents, reference style links keep paragraphs readable by moving addresses to the bottom of the page.

Images

Images use the same syntax as links with an exclamation mark in front. The text in brackets becomes the alternative text, which matters for accessibility.

![A red bicycle leaning on a wall](bike.jpg)

Inline Code and Code Blocks

Wrap short snippets in single backticks to show them as code. For several lines, use a fenced block with three backticks and an optional language name, which enables syntax highlighting.

print("Hello, Markdown")

Inside a block, characters are shown literally and nothing is formatted.

Quotes and Dividers

Start a line with a greater-than sign to create a quotation.

> A short quoted passage goes here.

Three hyphens or asterisks on a line of their own create a horizontal rule that separates sections.

Tables and Task Lists

Many tools support extensions beyond the original syntax. Tables use pipes and hyphens to draw columns, and task lists use brackets.

| Name  | Role   |
| ----- | ------ |
| Asha  | Editor |

- [x] Draft the outline
- [ ] Write the intro

These belong to extended flavors such as the one used on code hosting platforms, so check that your tool supports them.

Escaping Special Characters

If you want a literal asterisk or pound sign, place a backslash before it, for example \*. This stops the symbol from triggering formatting.

Tools for Writing Markdown

You can write in any plain text editor. Many dedicated editors show a live preview beside your text, and some render the formatting as you type. Pick whichever feels comfortable, and remember that the file itself stays portable.

Habits That Help

  1. Keep one idea per paragraph and one sentence per line if your team uses version control, since it makes changes easier to review.
  2. Leave blank lines around headings, lists and code blocks.
  3. Use consistent list markers throughout a file.
  4. Preview the result before publishing.
  5. Add descriptive alt text to every image.

A Short Practice Exercise

Open a new text file, write a heading with your name, a paragraph about yourself, a list of three hobbies with one in bold, and a link to a favorite page. Save it with the .md extension and open it in a previewer. Seeing your own text transform is the fastest way to remember the syntax.

Frequently Asked Questions

Is Markdown a programming language?

No. It is a lightweight markup language, which means it only describes formatting. It has no logic, variables or loops. A converter turns it into HTML or another output format.

Why does my Markdown look different in different apps?

There are several flavors. The original rules were loose, so tools added their own extensions for tables, task lists and other features. Check which flavor your app supports if a feature does not render.

Can I use HTML inside Markdown?

Many Markdown processors allow raw HTML for things the syntax cannot express. Whether it is allowed depends on the tool, and some platforms strip it for security reasons.