What is Markdown?

Markdown is a very lightweight markup language devised by John Gruber. It is used to convert plain text to HTML using a simple syntax. The main advantages of doing this are (1) you can create HTML in a plain text editor and (2) you can create HTML without any knowledge of HTML syntax.

Markdown is a very lightweight markup language devised by John Gruber. It is used to convert plain text to HTML using a simple syntax. The main advantages of doing this are (1) you can create HTML in a plain text editor and (2) you can create HTML without any knowledge of HTML syntax.

 

The syntax is easy to learn. For example to make a word bold just write it as **word**. The Markup parser will translate the **…** and substitute it as <b>…</b>. To create a heading just underline a sentence with = and Markup will decorate the sentence as <h1>…</h1>.

 

Let’s see a fuller example. On the left is some Markdown text (using NotePad++) and on the right is the rendered HTML.
Markdown1

 

A Markdown parser is required to convert the plain text, but many editors and development tools are giving support and you can get extensions for the likes of Visual Studio, NetBeans, Eclipse, etc.

It can be an easier way to create HTML and also allow non-technical people who struggle with the triangular-bracket syntax a chance to write directly for a web site. As you only need a plain text editor, it allows you to pre-format text comments for later publication or printing.

 

This is using the Markdown Mode plugin for Visual Studio:
Markdown2

 

There’s a number of offshoots and enhancements to Markdown but they all work in roughly the same way. For more information see John Gruber’s site.