Link Search Menu Expand Document


Markdown is an alternative to HTML (Hypertext Markup Language) for producing formatted text, specially for web content.

The chief advantage of Markdown is the simplicity of it’s syntax. As an example, compare the syntax for bulleted lists between HTML and Markdown

Desired ResultHTML syntaxMarkdown syntax
  • Thing one
  • Thing two
  • Thing three
  <li>Thing one</li>
  <li>Thing two</li>
  <li>Thing three</li>
* Thing one
* Thing two
* Thing three

Or the difference between the syntax for hyperlinks:

Desired Result

Visit UC Santa Barbara

HTML syntax
Visit <a href="">UC Santa Barbara</a>
Markdown syntax
Visit [UC Santa Barbara](

A key advantage is for source code. Suppose you want the following C++ source code to appear on a web page:

   cout << "Hello, World" << endl;

While the <pre> tag can be used for source code (e.g. Java, C++, etc.), there is still the problem that many characters have to be escaped.

For example, the following is not legal HTML:

  cout << "Hello, World" << endl;

The problems are highlighted here (by the automatic syntax highlighing of Markdown):

  cout << "Hello, World" << endl;

To be strictly compliant HTML, this woudl have to be written as:

   cout &lt;&lt; &quot;Hello, World&quot; &lt;&lt; endl;

That is obviously inconvenient. Instead, in Markdown, one can simply write:

   cout << "Hello, World" << endl;

And get this

   cout << "Hello, World" << endl;

(Note that many systems that support Markdown processing have built-in syntax highlighting.)