MarkDown Getting Started
In this post, we’ll understand Markdown, its working and applications with examples.
What is Markdown?
Markdown is a lightweight markup language that is used to format and style the content of a text document. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages.
Markup language is very easy to learn, read and write for most of the people even without any technical knowledge. The main advantage of Markdown is readability of the text even after adding markdown markup. Look at the below markdown file (.md file) which render this section for example:-
what-is-markdown.md
## What is Markdown?
Markdown is a lightweight **markup** language that is used to *format and style* the content of a text document. Created
by [John Gruber](https://daringfireball.net/projects/markdown/) in 2004, Markdown is now one of the world’s most popular
markup languages.
Markup language is very easy to read and write for most humans. Text of the file is very much readable even after adding
markdown markup. Look at the below markdown file *(.md file)* which render this section for example:-
Read Markdown Syntax Guide for detailed explanation and Markdown Cheat Sheet for a quick overview of Markdown syntax.
How does Markdown Work?
You add markdown markup on content in plain text files generally having .md or .markdown extensions, and then Markdown applications convert those markdown files into HTML.
These application can be anything like Text Editors, Messengers, Static Site Generator, e-Book Generator, PDF Converter, Presentation Generator or a Command line script.
These applications use Markdown Processor (or Markdown Parser) behind the scenes which convert the Markdown files to HTML or other formats.
John Gruber written the original Markdown (also known as Gruber Markdown) and its parser in Perl. After that Markdown has evolved and today we have different flavours of Markdown and their parser implementation in different programming languages such as C, Java, JavaScript, GO, Perl etc.
Markdown Flavours
Markdown flavours are the extension (or superset) of Gruber Markdown. Some of the popular Markdown flavours are:-
- CommonMark is the most popular and widely used flavour of Markdown which is an effort to make a “standard, unambiguous syntax specification for Markdown, along with a suite of comprehensive tests to validate Markdown implementations against this specification”.
- Markdown Extra as the name suggest, provide support for additional elements like tables, definition lists, footnotes, abbreviations, etc.
- Critic Markup provide additional syntax for review like addition, deletion, substitution, comment, highlight, etc.
- Multi Markdown (MMD in short) provide additional features like internal cross referencing, footnote, maths formula, glossary, etc.
- R Markdown supports dozens of static and dynamic output formats including HTML, PDF, MS Word, Beamer, HTML5 slides, Tufte-style handouts, books, dashboards, shiny applications, scientific articles, websites, and more.
- GitHub Flavoured Markdown (GFM in short) is a superset of CommonMark which provide additional Github-specific features to be used for user content on GitHub.com.
Where Markdown is used?
Markdown is fast and easy to take notes; formatting text in chats, comments, and messaging applications; create content for the website, and publish documents like PDF, ePub and Presentations, etc.
Here are some of the applications which supports Markdown:-
Markdown Editors
The best way to learn Markdown is to use it. There are many online Markdown editors available where you can try writing in Markdown.
Dillinger
Dillinger is one of the famous online Markdown editor which allows you to type Markdown in left pane and show live HTML preview in the right pane. You can also import and export the file as Markdown, HTML or PDF.
Here is the list of other Markdown online editors:-
Web | Github | |
---|---|---|
Dillinger | https://dillinger.io/ | https://github.com/joemccann/dillinger |
Mark | https://mark.reaper.im/ | https://github.com/barelyhuman/mark |
Minimalist Online Markdown Editor | http://markdown.pioul.fr/ | https://github.com/pioul/Minimalist-Online-Markdown-Editor |
StackEdit | https://stackedit.io/ | https://github.com/benweet/stackedit |
MarkTwo | https://marktwo.app/ | https://github.com/anthonygarvan/marktwo |
Markdown Tutorial | https://www.markdowntutorial.com/ | https://github.com/gjtorikian/markdowntutorial.com |
Messaging Applications
Many chat bots and messengers now understand the power of Markdown. They provide basic formatting support using Markdown syntax.
You can format the text on Whatsapp which supports Markdown alike syntax for bold, italic, strikethrough, monospace, and code block.
If you’re chatting with someone on Facebook on a computer, you can change how your text looks with Markdown alike syntax. Keep in mind that text formatting is only visible on a computer, and will not appear in the Messenger app on mobile.
Team messaging applications such as Slack, Discord, and Mattermost also supports Markdown.
Collaboration Platforms
Most of the collaboration platforms provide good support for formatting span and block elements using Markdown.
Stackoverflow
A private collaboration & Knowledge sharing platform Stackoverflow supports basic syntax of Markdown for writing Questions and Answers.
GitHub
GitHub is an open source community to manager code repositories. GitHub heavily use GitHub Flavoured Markdown to write Documents, raise Issues with Markdown.
Markdown to Website
Many static website generator provides support for Markdown files. They convert Markdown (.md) files to website pages (.html).
Jekyll and Hugo are two recommended open source static site generator if you wish to create a static website for blog, book, resume, or profile. They provide free themes and templates which you can use to quickly build a website with little or no knowledge about HTML and CSS. You just need to add the markdown files with your content and they will be added to a website. You can also host these websites on GitHub Pages which is also free!
blot.im and smallvictori.es to check out, If you’re looking for the simplest possible way to create a website with Markdown files. After you sign up for one of these services, they create a Dropbox folder on your computer. Just drag and drop your Markdown files into the folder and — poof! — they’re on your website. It couldn’t be easier.
Here is the list of other static website generators:-
Markdown to eBook
Write and create an eBook with Markdown
- GitBook is a modern documentation platform where you can structure your markdown files to convert to a book or documentation.
- Pandoc is a universal document converter which can be used to convert markdown to anything for e.g. ePub books.
- BookDown to write HTML, PDF, ePub, and Kindle books with R Markdown
Markdown to PDF
Convert Markdown to PDF
- Dillinger editor allows you to write Markdown and export it as PDF.
- MarkdownToPDF is a website to upload a Markdown file and convert to PDF instantly.
- markdown-pdf is a npm module to convert Markdown to PDF.
- md2pdf is online app to write Markdown and transform it to PDF.
Markdown to Presentation
Create and edit your slides presentations with Markdown.
- Remark - A simple, in-browser, Markdown-driven slideshow tool targeted at people who know their way around HTML and CSS.
- Cleaver - Comes with default stylesheet and many other themes to use for the slides.
- Marp - Markdown presentation ecosystem. CLI, Web, IDE plugin and more to convert Markdown into various formats
- Deckset - Write your presentation as a Markdown text document, open it in Deckset, and present. Change and add slides on the fly with just a few keystrokes, even while presenting or in the few precious minutes before. Choose from dozens of themes and customize them to your needs.
- Hyperdeck - A new app that combines the best of both worlds in one iPad / macOS app. With top notch support for source code, tables, and animations.
- gitpitch - Markdown Presentations For Everyone on GitHub, GitLab, Bitbucket, GitBucket, Gitea, and Gogs.
- hacker-slides - Minimal UI for building presentation slides from markdown.
- mdp - Command-line based Markdown presentation tool. Like PowerPoint and Vim but with Markdown!
- reveal.js - Open source HTML presentation framework with Markdown support.