Introduction

Markdown is a lightweight markup language that uses plain-text symbols you type on your keyboard to format documents, which a processor then renders into formatted HTML.

Learn Python, JavaScript, Java and more with free interactive lessons, real projects and AI-powered help. Beginner-friendly.

Part of the free Markdown course at LearnCodingFast — hands-on lessons with examples you run in your browser, plus practice exercises and a quick quiz.

By the end of this lesson you'll be able to write a heading, split text into clean paragraphs, and make words bold or italic — and, crucially, you'll know exactly how each symbol renders on screen.

Markdown is a way of writing formatted text using plain symbols you type with your keyboard. A markup language just means a set of small marks that tell a program "make this a heading", "make this bold", and so on. Markdown was created by John Gruber in 2004 with one goal: the formatting should be easy to read even before it's turned into a web page .

You write the Markdown source (plain text with a few symbols), and a Markdown processor converts it into formatted HTML that you see on screen — the rendered result . Those two words, source and rendered , are the whole story of this lesson. You write the source; the computer renders it.

Think of Markdown like the editing marks a writer scribbles on a paper manuscript . When an editor wants a word emphasised, they underline it; when they want a new section, they draw a big heading. The typesetter reads those marks and produces the finished, beautifully laid-out page. In Markdown you are the editor adding marks ( # , * , blank lines), and the Markdown processor is the typesetter that turns your marks into the polished result. Your marks stay readable on their own — that's why Markdown feels so natural.

Here's the same content three ways: the short Markdown you type, the longer HTML it becomes, and the final rendered result you see.

Markdown gives you the same result as HTML with a fraction of the typing. You'll learn HTML later in the course — for now, just notice how much shorter the Markdown column is.

1. Headings

A heading is a title for a section. In Markdown you make one by starting a line with one or more # symbols, then a space , then your text. The number of # signs sets the level: one # is the biggest (level 1), and six ###### is the smallest (level 6). Use a single level-1 heading for the page title and work down from there.

Notice how each extra # makes the heading smaller. Run the block below to print this same Markdown, then paste it into a previewer to watch it render.

Fill in the blanks marked ___ so the first line is a level-1 heading and the second is a level-2 heading.

2. Paragraphs & Line Breaks

A paragraph is just a block of normal text — no symbols needed. The catch that trips up everyone at first: to start a new paragraph you must leave a completely blank line between blocks. Pressing Enter once is not enough — a single line break is ignored, and the two lines render as one continuous paragraph.

See how "Roses are red" and "violets are blue" joined into one line? The single line break was ignored. The blank line is what created the second paragraph. If you genuinely want a hard line break inside a paragraph, end the line with two spaces — but blank lines for new paragraphs is the rule you'll use 99% of the time.

3. Emphasis: Bold & Italic

To emphasise words, you wrap them in asterisks. One asterisk on each side gives italic : *like this* . Two asterisks on each side gives bold : **like this** . Three gives both at once: ***like this*** . The asterisks must hug the words with no spaces inside — ** word ** won't render.

Fill in the blanks so "free" becomes bold and "today" becomes italic .

This course is free for everyone and you can start today right now.

No blanks this time — just a brief. In a Markdown editor, write a short profile using everything from this lesson. Then compare it to the expected result.

I work as a teacher and in my spare time I love rock climbing .

Q: Where does the rendered version actually appear?

Anywhere a Markdown processor runs it — GitHub renders your README.md when you view the page, VS Code shows a preview pane, and chat apps render it the instant you send a message. The .md file itself always stays plain text.

Q: Can I use - (dashes) instead of * for italic and bold?

For emphasis you use * asterisks or _ underscores (e.g. _italic_ also works). Dashes are used for lists and horizontal rules, which you'll meet in later lessons.

Q: Why didn't my second line start a new paragraph?

Because you only pressed Enter once. A single line break is ignored — you need a fully blank line between the two blocks of text for a new paragraph.

The basics in this lesson — headings, paragraphs, bold, italic — work identically everywhere. Some platforms add extras (GitHub-flavoured Markdown adds task lists and tables), but what you've learned here is universal.

In VS Code, open any .md file and press Ctrl+Shift+V ( Cmd+Shift+V on Mac) for an instant live preview. Watching the rendered result update as you type is the fastest way to build an intuition for Markdown.

Practice quiz

Who created Markdown and in what year?

  • Tim Berners-Lee in 1991
  • John Gruber in 2004
  • Linus Torvalds in 2005
  • Guido van Rossum in 2000

Answer: John Gruber in 2004. John Gruber created Markdown in 2004 to keep formatting readable as plain text.

How do you make a level-1 heading?

  • Start the line with one # and a space
  • Wrap the text in **
  • Indent the line by four spaces
  • Underline it with equals only

Answer: Start the line with one # and a space. A single # followed by a space and text creates a level-1 heading.

How many # symbols make the smallest heading level?

  • One
  • Three
  • Six
  • Ten

Answer: Six. ###### (six hashes) makes a level-6 heading, the smallest.

What starts a new paragraph in Markdown?

  • A single line break
  • A tab character
  • A semicolon
  • A completely blank line

Answer: A completely blank line. A blank line separates paragraphs; a single line break is ignored.

Which syntax makes text bold?

  • **text**
  • *text*
  • _text_ (single)
  • ~text~

Answer: **text**. Two asterisks on each side, **text**, renders as bold.

Which syntax makes text italic?

  • **text**
  • ##text##
  • *text*

Answer: *text*. One asterisk on each side, *text*, renders as italic.

What does ***text*** produce?

  • A heading
  • Plain text
  • Bold and italic at once
  • A code block

Answer: Bold and italic at once. Three asterisks combine bold and italic on the same text.

Why does #Hello (no space) fail to render as a heading?

  • Headings need bold too
  • A heading requires a space after the #
  • Headings cannot start a line
  • # is only for italics

Answer: A heading requires a space after the #. You must put a space after the # so the parser treats it as a heading.

What does a Markdown processor produce from the source?

  • A PDF only
  • Formatted HTML
  • A spreadsheet
  • Compiled binary

Answer: Formatted HTML. A Markdown processor renders the plain-text source into formatted HTML.

Will ** bold ** (with inner spaces) render as bold?

  • No, the asterisks must touch the words
  • Yes, spaces are ignored
  • Only in headings
  • Only on GitHub

Answer: No, the asterisks must touch the words. The asterisks must hug the words with no inner spaces, e.g. **bold**.