A lightweight markup language is a markup language with a simple syntax, designed to be easy for a human to enter with a simple text editor, and easy to read in its raw form....
John Gruber is a writer from the greater Philadelphia, Pennsylvania area of the USA. Gruber received his Bachelor of Science in computer science from Drexel University. He worked for Bare Bones Software from 2000 to 2002 and Joyent from 2005 to 2006...
Aaron Swartz is an American programmer, writer, political organizer and Internet activist. He is best known in programming circles for co-authoring the RSS 1.0 specification...
allowing people "to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML
XHTML
XHTML is a family of XML markup languages that mirror or extend versions of the widely-used Hypertext Markup Language , the language in which web pages are written....
In computing, plain text is the contents of an ordinary sequential file readable as textual material without much processing, usually opposed to formatted text....
Electronic mail, commonly known as email or e-mail, is a method of exchanging digital messages from an author to one or more recipients. Modern email operates across the Internet or other computer networks. Some early email systems required that the author and the recipient both be online at the...
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...
script written by Gruber, Markdown.pl, which converts marked-up text input to valid, well-formed XHTML or HTML and replaces left-pointing angle brackets ('<') and ampersand
Ampersand
An ampersand is a logogram representing the conjunction word "and". The symbol is a ligature of the letters in et, Latin for "and".-Etymology:...
s with their corresponding character entity references. It can be used as a standalone script, as a plugin for Blosxom
Blosxom
Blosxom is a free-software weblog program written in Perl by Rael Dornfest. It uses the pre-existing file system instead of a database management system, unlike most blog software....
Movable Type is a weblog publishing system developed by the company Six Apart. It was publicly announced on September 3, 2001; version 1.0 was publicly released on October 8, 2001. On 12 December 2007, Movable Type was relicensed as free software under the GNU General Public License...
BBEdit is a proprietary text editor made by Bare Bones Software. It was originally developed for Macintosh System Software 6 and is now available for Mac OS X.BBEdit is marketed under the trademark slogan, "It doesn't suck."-History:...
.
Markdown has since been re-implemented by others as a Perl module
Modular programming
Modular programming is a software design technique that increases the extent to which software is composed of separate, interchangeable components called modules by breaking down program functions into modules, each of which accomplishes one function and contains everything necessary to accomplish...
CPAN, the Comprehensive Perl Archive Network, is an archive of nearly 100,000 modules of software written in Perl, as well as documentation for it. It has a presence on the World Wide Web at and is mirrored worldwide at more than 200 locations...
(Text::Markdown), and in a variety of other programming languages. It is distributed under a BSD-style license and is included with, or available as a plugin for, several content-management systems
Content management system
A content management system is a system providing a collection of procedures used to manage work flow in a collaborative environment. These procedures can be manual or computer-based...
.
Syntax examples
This is not an exhaustive listing of Markdown's syntax, and in many cases multiple styles of syntax are available to accomplish a particular effect. See the full Markdown syntax for more information. Characters which are ordinarily interpreted by Markdown as formatting commands will instead be interpreted literally if preceded by a backslash; for example, the sequence '\*' would output an asterisk rather than beginning a span of emphasized text. Markdown also does not transform any text within a "raw" block-level XHTML element; thus it is possible to include sections of XHTML within a Markdown source document by wrapping them in block-level XHTML tags.
Paragraphs
A paragraph is one or more consecutive lines of text separated by one or more blank lines. Normal paragraphs should not be indented with spaces or tabs:
This is a paragraph. It has two sentences.
This is another paragraph. It also has
two sentences.
Line return
Line breaks inserted in the text are removed from the final result: the web browser is in charge of breaking lines depending on the available space. To force a line break, insert two spaces at the end of the line.
Emphasized text
*emphasis* or _emphasis_ (more common)(e.g., italics)
To include code (formatted in monospace font), you can either
surround inline code with backticks (`), like in
Some text with `some code` inside,
or indent several lines of code by at least four spaces, as in:
line 1 of code
line 2 of code
line 3 of code
The latter option makes Markdown retain all whitespace—as opposed
to the usual behaviour, which, by removing line breaks and excess
spaces, would break indentation and code layout.
Lists
* An item in a bulleted (unordered) list
* A subitem, indented with 4 spaces
* Another item in a bulleted list
1. An item in an enumerated (ordered) list
2. Another item in an enumerated list
Headings
HTML headings are produced by placing a number of hashes
Number sign
Number sign is a name for the symbol #, which is used for a variety of purposes including, in some countries, the designation of a number...
before the header text corresponding to the level of heading desired (HTML offers six levels of headings), like so:
# First-level heading
#### Fourth-level heading
The first two heading levels also have an alternative syntax:
First-level heading
Blockquotes
> "This entire paragraph of text will be enclosed in an HTML blockquote element.
Blockquote elements are reflowable. You may arbitrarily
wrap the text to your liking, and it will all be parsed
into a single blockquote element."
The above would translate into the following HTML:
This text will be enclosed in an HTML blockquote element. Blockquote
elements are reflowable. You may arbitrarily wrap the text to your liking, and it will all
be parsed into a single blockquote element.
Links
Links may be included inline:
[link text here](link.address.here "link title here")
Alternatively, links can be placed in footnotes outside of the paragraph, being referenced with some sort of reference tag. For example, including the following inline:
[link text here][linkref]
would produce a link if the following showed up outside of the paragraph (or at the end of the document):
[linkref]: link.address.here "link title here"
Horizontal rules
Horizontal rules are created by placing three or more hyphens, asterisks, or underscores on a line by themselves. You may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule:
Bitbucket is a web-based hosting service for projects that use either the Mercurial or Git revision control systems. Bitbucket offers both commercial plans and free accounts...
offers Markdown as an option for markup in project's README.
Diaspora is a non-profit, user-owned, distributed social network that is based upon the free Diaspora software. As of November 2011, there are more than 200 thousand users connected to the biggest server...
uses Markdown to format user posts, comments and conversations .
Drupal is a free and open-source content management system and content management framework written in PHP and distributed under the GNU General Public License. It is used as a back-end system for at least 1.5% of all websites worldwide ranging from personal blogs to corporate, political, and...
has a Markdown add-on, initiated in 2008. As of November 2011 it in use on over 8000 Drupal sites world-wide.
GitHub is a web-based hosting service for software development projects that use the Git revision control system. GitHub offers both commercial plans and free accounts for open source projects...
uses a dialect of Markdown for formatting comments, messages, etc. John Gruber has described this dialect as a "superior variant" for "situations like user-submitted comments".
Instiki is wiki software that runs on Ruby on Rails.- Features :* Regular expression search* Revisions* Export to HTML in a zip* RSS feeds* Multiple webs* Password-protected site* Reference tracker* Textile and Markdown formatting...
A wiki is a website that allows the creation and editing of any number of interlinked web pages via a web browser using a simplified markup language or a WYSIWYG text editor. Wikis are typically powered by wiki software and are often used collaboratively by multiple users. Examples include...
Posterous is a simple blogging platform started in May 2008, funded by Y Combinator. It is based in San Francisco.Updating to Posterous is similar to other blogging platforms. Posting can be done by logging in to the website's rich text editor, but it is particularly designed for mobile blogging...
reddit is a social news website where the registered users submit content, in the form of either a link or a text "self" post. Other users then vote the submission "up" or "down," which is used to rank the post and determine its position on the site's pages and front page.Reddit was originally...
uses Markdown.
Showoff uses Markdown to format slides of a presentation.
Squarespace is a web publishing company that sells a software publishing platform and file server service to individuals and businesses, providing them the tools and assistance to create and maintain well-designed websites...
In software, a stack overflow occurs when too much memory is used on the call stack. The call stack contains a limited amount of memory, often determined at the start of the program. The size of the call stack depends on many factors, including the programming language, machine architecture,...
The Stack Exchange Network is a network of websites featuring questions and answers on a wide range of topics in different fields, owned and operated by Stack Exchange, Inc....
sites use a modified dialect of Markdown as its default formatting system.
Tumblr is a website and microblogging platform that allows users to post text, images, videos, links, quotes and audio to their tumblelog, a short-form blog. Users can follow other users, or choose to make their tumblelog private. The service emphasizes ease of use. The site ranks as the 10th...
WordPress is a free and open source blogging tool and publishing platform powered by PHP and MySQL. It is often customized into a content management system . It has many features including a plug-in architecture and a template system. WordPress is used by over 14.7% of Alexa Internet's "top 1...
plugin system utilizes a dialect of Markdown in "readme.txt" files submitted by developers, and has plugins for Markdown.
reStructuredText is a lightweight markup language intended to be highly readable in source format. Its formal name indicates that it is a "revised, reworked, and reinterpreted StructuredText."...
Textile is a lightweight markup language originally developed by Dean Allen and billed as a "humane Web text generator". Textile converts its marked-up text input to valid, well-formed XHTML and also inserts character entity references for apostrophes, opening and closing single and double...
Markdown Extra is a lightweight markup language based on Markdown, which implements some added features currently not available with plain Markdown syntax.It adds the following features to Markdown:* Inline HTML...
is based upon Markdown but extends its capabilities.
MultiMarkdown is a lightweight markup language created by Fletcher S. Penney and based on Markdown, which supports more export-formats and implements some added features currently not available with plain Markdown syntax....
is another improved Markdown with more syntax-features and export-options than traditional Markdown.
AsciiDoc is a lightweight markup language. It requires the installation of a special AsciiDoc "converter program" that can convert AsciiDoc documents to XHTML, DocBook or HTML. DocBook in turn can be converted to other formats such as PDF, TeX, Unix manpages and many more using the tool A2X which...
another lightweight markup supporting many types of document.
MarkdownPapers, Java implementation based on a JavaCC parser
pegdown, a pure-Java Markdown implementation based on a PEG
Parsing expression grammar
A parsing expression grammar, or PEG, is a type of analytic formal grammar, i.e. it describes a formal language in terms of a set of rules for recognizing strings in the language...
In functional programming, a parser combinator is a higher-order function which accepts several parsers as input and returns a new parser as its output. In this context, a parser is a function accepting strings as input and returning some structure as output, typically a parse tree or a set of...
In functional programming, a parser combinator is a higher-order function which accepts several parsers as input and returns a new parser as its output. In this context, a parser is a function accepting strings as input and returning some structure as output, typically a parse tree or a set of...
Txtmark, another Markdown implementation written in Java
Java
Java is an island of Indonesia. With a population of 135 million , it is the world's most populous island, and one of the most densely populated regions in the world. It is home to 60% of Indonesia's population. The Indonesian capital city, Jakarta, is in west Java...
Blackfriday, another Markdown implementation written in Go
Go (programming language)
Go is a compiled, garbage-collected, concurrent programming language developed by Google Inc.The initial design of Go was started in September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. Go was officially announced in November 2009. In May 2010, Rob Pike publicly stated that Go was being...