Markdown

This page was originally written in markdown. Click here to view the original Markdown file so you can compare it to what you see here after it was converted to HTML.

Overview

Markdown is a markup language. Markup languages define annotations which can be added to plain text files so that the text can be rendered nicely by a formatting system.

Two other examples of markup languages are HTML and LaTeX. When a web browser displays a web page written in HTML it uses the annotations to figure out how to nicely render the text. LaTeX is frequently used by computer scientists to write papers, books, syllabi, etc.

While HTML and LaTeX are very powerful, the HTML and LaTeX files themselves are not very pleasant to read as they are littered with tags. By contrast, Markdown is a very small, simple language that can produce nice documents, but that also looks nice when viewed in plain text.

There are numerous tools that can convert Markdown to other more complex formats such as HTML, LaTeX, and more. The page you are reading right now was written in Markdown and then converted to HTML.

Headers

Start a line with one or more hash characters to define a header. The more hashes the smaller the header.

Paragraphs

Paragraphs are separated by blank lines.

Here is a new paragraph.

Lists

Markdown supports lists:

Lists can also be numbered:

  1. First item
  2. Second item

Code

To format code in monospace, indent a block of text 4 spaces:

def a_function():
    print('hi!')

You can also inline bits of code by surrounding text in backticks.

Links are made by putting the text of a link in square brackets followed by the URL in parenthesis. For example, click here to visit the official Markdown page.