What Is Markdown? And How To Use It Effectively?

Read it in 10 Mins

Last updated on
31st Dec, 2021
31st Dec, 2021
What Is Markdown? And How To Use It Effectively?

Markdown is a simple markup language that uses plain text formatting syntax. It is intended to be converted to structured HTML. It is frequently used to format readme files. 

Markdown languages were created in 2004 by John Gruber and Aaron Swartz. The goal of Markdown is to make it easy to read. With the Markdown language, you can easily read and write web-based documents. 

What is Markdown?

You're "formatting" text when you add bold, italics, numbered lists, bullet points, headings, and so on. Markdown is a syntax (or set of rules) that is used to format text on web pages. It’s extension is .md. 

People used Hypertext Markup Language, or HTML, to format text on web pages in the past. HTML is one of three markup languages, the others being eXtensible Markup Language (XML) and Standard Generalized Markup Language (SGML) (SGML). 

Tags are used to surround text in order to format it with HTML. For example, to bold text, type "<b> this is some bold text </b>." 

When you "read" a web page, your web browser interprets the HTML tags and applies the appropriate formatting. When it sees "<b> this is some bold text </b>," it knows that anything between the <b> and /b> tags should be in bold. The tags (<b> and </b> are also hidden by the browser.

HTML can be quite complex, with dozens and dozens of tags like <span>, <div>, <kbd>, <ol>, and many more. Computers have no trouble reading these because they simply follow the syntax (HTML rules) and apply the formatting that corresponds to the tags. 

The tags, on the other hand, make it difficult for humans to read HTML and fully understand how the text will appear after the computer renders it. It's not particularly "user-friendly" for those who haven't read it before. 

Markdown, on the other hand, is intended to be "as simple to read and write as possible." On Gruber's website, John Gruber and Aaron Schwartz explain why they created Markdown in 2004 and provide a syntax guide. 

In a brief, Markdown makes it easier to format text for web pages because its tags are simpler than HTML and automatically convert to HTML. This means you don't need to know HTML to write something for a web page because Markdown automatically converts your tags to HTML. 

We can use HTML tags within a markdown file which markdown can understand and convert meaningfully. But it does not understand or cover all HTML tags, but rather the most commonly used formatting options. 

Why should you use Markdown?

It’s Easy to Learn and Fast to Use:

Markdown is a very simpleto learn. The official syntax can be found here, but the most important thing to remember is that typing *word* will make it bold, typing **word** or _word_ will italicise the word, links are written like this [anchor text](http://www.URL.com), and lists are written exactly how you'd expect: just hit enter and add any of these three characters at the beginning of each line: -, *,  

So typing Markdown is almost always faster than writing with a rich text editor, especially when it comes to things like links or bulleted lists, which require you to use the mouse or memorize a complicated sequence of keyboard shortcuts. One caveat: if you need complex text elements, such as tables, you should stick to HTML. Fortunately, Markdown fully supports HTML, so you can code a table in HTML and then switch back to Markdown in the same document. 

Furthermore, raw Markdown is much easier to read than raw HTML. This is one of the reasons Markdown was created in the first place. 

It Converts to HTML Easily:

If you're going to write HTML, you should just write HTML. However, if you're writing an email or a readme file and need HTML's formatting options but not all its features, Markdown is ideal. 

Markdown seamlessly converts to HTML, saving you the time and effort of opening and closing all those tags. 

In fact, Markdown includes software to convert plain text to HTML! So, in addition to being a markup language, Markdown is also a text-to-HTML conversion software. 

Furthermore, have you ever attempted to convert a.docx file to HTML? It's often not worth the effort because you get so much extra formatting and spacing. 

Markdown is Futureproof:

Markdown is a plain text format that is "futureproof." Markdown will be usable and openable by modern programsfor as long as plain text is the standard (which it will be for a very long time). In comparison, Microsoft Word has eight different filetypes as of 2018. Keeping things in plain text ensures that there will never be an outdated version, which means that software will not need to be updated to keep up with the format. 

Markdown has its own file extension: .md, but it was designed to be perfectly readable as a raw text file. So, it's safe to say that Markdown is not going away anytime soon. 

It is used Everywhere:

You might think that as the rich text becomes more popular, Markdown's use has stopped growing, but that is not the case. Markdown's popularity has grown steadily since its beginning, and it is likely to continue to do so. 

On popular coding sites like GitHub, Markdown is the unofficial standard. It is also the default format for popular communication tools like Skype, Slack, and (to a lesser extent) Facebook Messenger. Wikipedia even employs a modified Markdown syntax known as wikitext. 

In an increasingly social world of coding, the programmer who does not understand Markdown will be at a disadvantage (or, at the very least, confused for a little while). 

So, if nothing else, learn Markdown so you can keep up with the industry. 

The Markdown Syntax - A Quick Primer

These are the elements that were outlined in John Gruber's original design document. These elements are supported by all Markdown applications.  

ElementMarkdown Syntax
Heading# H1 
## H2 
### H3  
Bold**bold text**
Italic*italicized text*
Blockquote> blockquote
Ordered List
  • First item
  • Second item
  • Third item
Unordered List- First item
- Second item
- Third item
Horizontal Rule---
Image![alt text](image.jpg)

Markdown in Practice

We will use VSCode Editor in this tutorial to see how to use markdown and preview it side-by-side. I am assuming that you have VSCode Editor installed on your system. 

Step 1: Install the extension “Markdown Preview Enhanced” on the VSCode Editor. 

What Is Markdown?

Step 2:  Create a file with .md extension under the folder of your choice.

Step 3: Now turn on the preview mode using Ctrl+K V;, you will get a split- screen for the code and preview mode. 

What Is Markdown?

Best Practices & Tips: 

Markdown allows you to write anything you want once and convert it to almost any format you want to use. The examples below demonstrate how to convert simple text written in MD into various formats. You don't need multiple text formats—you can start with a single source. 

Markdown was created with the explicit goal of being human-readable. The majority of the syntax should be fairly simple and intuitive. 

Now, we will take a look at the different formats in the markdown: 

In your .md file write the following code to see the preview. 

What Is Markdown?

You will see preview as:  

What Is Markdown?

In Markdown, headings are any lines that begin with a # symbol. The number of hashes indicates the heading's level. One hash is converted to a h1, two hashes are converted to h2, and so on. There are a total of six levels available to you, but for most writing, you'll rarely need more than three. 

To add a link, enclose the text to be linked in square brackets, followed by the URL to be linked in parenthesis. Consider it like turning a word into a button to help you remember it. [button] and (where to go when the button is clicked) work together to form a link. 

Markdown images have the same formatting as links, but they're preceded by an !. This time, the text in brackets is the alt text - or the image's descriptive text. 

Let’s see some more formats and check their preview to be more comfortable with markdown. 

**For Code Base** 
Turn on Preview mode using `Ctrl+K V`. 
var name = "Ishan"; 
**For Tables** 
|Table |Goes |Here | 
|--- |--- |--- | 
|one |two |three | 
**Ordered & Unordered Lists** 
1. List One 
2. List Two 
3. List Three 
 1.List Four 
- List Five 

You will see the preview as:  

What Is Markdown?

If you're a technical writer, you might want to use code snippets to teach your readers a specific syntax (as I'm doing with this blog post). A quick code snippet can be displayed by placing a single backtick around a word in a sentence. 

Lists are a formatting nightmare in HTML, but Markdown lists are a breeze. we can simply prefix each statement like with a * - or - or + to convert them to dots for a bullet list. You can also make nested lists; simply indent a line with four spaces and it will be nested beneath the line above.

Why learn Markdown? 

Once you've mastered Markdown, it's an incredibly powerful writing tool that will allow you to create rich web content much faster than almost any other method. However, there is a learning curve involved in getting to that point. We think that we have put togretheran all-inclusive guide to shorten that learning curve and possibly taughtyou a few useful Markdown tricks you might not have known. Markdown is an effective tool, and it will stay relevant in the time to come. 


Abhresh Sugandhi


Abhresh is specialized as a corporate trainer, He has a decade of experience in technical training blended with virtual webinars and instructor-led session created courses, tutorials, and articles for organizations. He is also the founder of Nikasio.com, which offers multiple services in technical training, project consulting, content development, etc.