What is Markdown and How to use it?
- Nusrat Sarmin
- October 09, 2022
Markdown is favored for creating formatted web content. Markdown uses a simple formatting syntax and allows you to use signs and characters you're already familiar with. It is perfectly simple to write and extremely easy to read. Here’s a quick explanation of what Markdown is, and how and where you can use it...
What Is Markdown?
Markdown is a lightweight markup language. It’s a text-to-HTML conversion tool that allows web writers and publishers to add formatting syntax to plain text. Simply we can say Markdown is a super simple way to stylize text with special characters like asterisks, dashes, underscores, braces, etc. It provides an efficient way to format text and then convert it to structurally valid XHTML (or HTML). It even, lets anyone write and create web pages without any coding knowledge.
History Of Markdown
Markdown was inspired by pre-existing conventions for marking up plain text in an email and USENET posts, such as the earlier markup languages Setext, Textile, and reStructuredText.
John Gruber designed Markup in collaboration with Aaron Swartz in 2004. John Gruber is well known for his Apple-focused blog and Aaron Swartz is a co-founder of Reddit. They aimed to create human-readable formatted documents, without looking like it has been marked up with tags or formatting instructions, unlike text formatted with ‘heavier’ markup languages, such as Rich Text Format (RTF) or HTML.
JOHN GRUBER - co-founder of Markdown explains the philosophy of Markdown on his website Daring Fireball and mentioned that :
The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.
How Does Markdown Work?
Markdown is composed of two things:
- A plain text formatting syntax.
- A software tool, written in Perl, that converts plain text formatting to HTML.
A Markdown document file is saved with a .md or .markdown extension. There are several Markdown applications available for writing Markdown text and converting it into HTML. These applications use a Markdown processor for translating .md files and visualizing them on the web. Besides, you can export the Markdown into other formats like PDF or Docx. Markdown editors that are built for Markdown provide easy approaches to writing documents and previewing how they will exactly look on the web.
Here's a Screenshot taken from Dillinger - Online Markdown Editor
How to Write Markdown Syntax?
You can add Markdown formatting elements to a plaintext file using a text editor application. Some Popular Applications for Writing Markdown are:
Symbols & characters are used to format text on a Markdown file. You will find the Markdown Syntax on John Gruber's website.
Let’s learn a few basic formatting techniques:
Hash(#) symbol is used before a word or sentence to format it as a header. A different number of hashes is used to demonstrate the heading from h1 to h6.
# This is an <h1> heading
## This is an <h2> heading
### This is an <h3> heading
and so on (till h6)
Markdown supports another style for H1 and H2. “underlined” uses equal signs (for first-level headers) and dashes (for second-level headers).
This is an H1
This is an H2
2. Emphasis (Italics & Bold)
*asterisks* or _underscores_ is used to emphasize. A single asterisk or underscore will italicize the text, and a double asterisk or underscore will make the word bold.
*This text will be italic*
**This text will be bold**
_This text will be italic_
__This text will be bold__
To display unordered list, use asterisks or hyphens, or pluses
To display the ordered list, use numbers
It uses a combination of brackets for the anchor text and parentheses for the URL
Let's have a look at the table below to learn more about markdown syntax:
Where Can Markdown be Used?
Markdown is used in many places. Markdown is widely used in blogging, instant messaging, online forums, collaborative software, documentation pages, and readme files. Different applications and platforms support it for formatting text.
You can use markdown on...
Websites: You can create text-heavy websites or blogs with Markdown files. Markdown is widely used on forum websites and websites that display user-generated content. GitHub, Reddit, and Evernote users can write content using Markdown.
Popular static site generators Jekyll, Hugo, and 11ty support markdown files to build an HTML website. Ghost CMS - an open-source blogging platform with a nice Markdown editor, is another great example.
You can write email messages using Markdown. Some email clients like MailMate and Airmail support Markdown. There is a Markdown browser extension Markdown Here that converts Markdown-formatted text into HTML that’s ready to send.
You can use a Markdown document authoring application to create and export Markdown-formatted documents to PDF or HTML file format
You can write a book using Markdown and self-publish your book using apps that turn Markdown-formatted files into eBooks.
Markdown applications are used to create a to-do list and TODO.md files that contain tasks organized in multiple sections. You can create a quick to-do list with checkboxes in your project directory using Markdown.
Markdown is an excellent tool for writing technical documentation. Companies are switching to a markdown formatting system for their documentation.
There are several applications for creating a documentation website from markdown files. A few popular tools for creating service or product documentation websites are Read the Docs, MkDocs, Docusaurus, etc.
Why Is Markdown Important?
We use markup for almost everything. This open-source language lets writers format plain text and generate different outputs without limitations.
The key reasons why you should use Markdown are:
- Markdown’s syntax is intended to provide easy read-and-write approaches.
- It allows for distraction-free writing. Hence It increases efficiency and productivity.
- Markdown is better than word processors or WYSIWYG editors like Microsoft word. You don't need to move your mouse over the screen and look for features to format text.
- Free to use and a great alternative to paid software like Microsoft Office and Google Suite.
- Beginner-friendly and intuitive syntax. After using markdown for a few hours, it will become second nature to you, and you'll be able to use it without worrying about remembering the syntaxes.
- Platform-independent, Every operating system supports Markdown-based content. Markdown files are portable and can be uploaded to any repository and opened in any editor.
- Converts plain text into HTML.
- Markdown-based editors are a free alternative to Documentation Software such as easyDITA or Oxygen XML Editor. These authoring tools are not only expensive but also specific in the type of source files they use. Markdown-based service or product documentation can be easily ported across platforms.
How to learn Markdown?
Markdown has a very gentle learning curve. You can learn quickly. You don't need to learn a lot of complicated tags, you can type faster, and it works well across platforms. Once you start practicing, You can learn it in no time.
Heads Up, Every Markdown application uses a slightly different version of Markdown. Each one of these Markdown applications implements its own variant of Markdown. These variants are referred to as 'Flavor'. So, you need to learn whichever flavor of Markdown your particular application uses.
You can find lots of resources online for learning Markdown. Here are some useful resources for newbies:
- Daring Fireball: Markdown: The original guide by the creator of Markdown John Gruber.
- Markdown Guide: A free and open-source reference guide that explains how to use Markdown.
- Markdown Tutorial. An open-source website that provides a platform to practice Markdown with instructions.
- GitHub Markdown Docs: Basic Writing and Formatting Syntax tutorial for learning GitHub Flavored Markdown (GFM)
- W3schools.io:Markdown Tutorial: This eLearning guide covers Markdown tutorials with examples.
Markdown is Futureproof, Used Everywhere and Worth Learning
Markdown's use is continually increasing. The reason behind that is Markdown is a futureproof and standard form of raw text. It is readable by all modern programs and isn't tied to a specific app, exports purely to HTML, and is easy to read.
Markdown is a wonderful tool for writing formatted text using a plain-text editor. If you write frequently for the web then it's a perfect tool for you. It removes the challenges that you face with word processors or WYSIWYG editors. It gains popularity as a more writer- and reader-friendly syntax.
How Should You Manage Forms on Your Jamstack Website?
Handling forms on a Jamstack website involves a slightly different approach compared to traditional server-rendered websites. The Jamstack philosophy encourages decoupling the frontend and backend, which can impact how forms are handled.Read article