3  Using markdown

Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. - Markdown Guide

Quarto documents contain content that is formatted with markdown. Where in text editors, you press buttons to make text bold, create a hyperlink, or create headers, in markdown you explicitly write these elements out in the raw text. This raw markdown can then be converted to other formats, such as HTML, pdf, epub or even Word. In a Quarto book, this is done automatically when you render the book.

Tip

Some useful resources:

3.1 Basic syntax

Markdown Syntax Output
*italics* and **bold**
italics and bold
superscript^2^ / subscript~2~
superscript2 / subscript2
~~strikethrough~~
strikethrough
`verbatim code`
verbatim code
# Header 1

Header 1

## Header 2

Header 2

### Header 3

Header 3

3.2 Lists

* unordered list
  + sub-item 1
    - sub-sub-item 1
  + sub-item 2


  • unordered list
    • sub-item 1
      • sub-sub-item 1
    • sub-item 2
1. ordered list
2. item 2
   i. sub-item 1
      A.  sub-sub-item 1


  1. ordered list
  2. item 2
    1. sub-item 1
      1. sub-sub-item 1
*   item 2
    
    Continued (indent 4 spaces)


  • item 2

    Continued (indent 4 spaces)

term
: definition


term
definition

3.4 Tables

    | Right | Left | Default | Center |
    |------:|:-----|---------|:------:|
    |   12  |  12  |    12   |    12  |
    |  123  |  123 |   123   |   123  |
    |    1  |    1 |     1   |     1  |
Right Left Default Center
12 12 12 12
123 123 123 123
1 1 1 1
Note

It is possible to use raw html elements in a quarto document. But try to limit this because:

  • Not everyone knows how html works, so it’s less accessible for others to work with your content.
  • Raw html elements will only correctly be displayed in html output. If you have pdf output, for example, the html elements are not rendered correctly.