Introduction to Markdown
If you have ever worked with git platforms like GitHub, BitBucket or Submitted any question or answers to an online forum, chances are you pretty much have unknowingly used Markdown.
Markdown is a lightweight markup language. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages. And given below is a detailed explanation of its advantages and on using it.
The extension for a Markdown file is .md or .markdown. To compile a markdown file you need an application capable of processing markdown files like Microsoft Word, Dillinger, etc. These applications use a Markdown processor or parser which converts a markdown file to printable HTML code.
What is Markdown?
Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages.
Using Markdown is different than using a WYSIWYG editor. In an application like Microsoft Word, you click buttons to format words and phrases, and the changes are visible immediately. Markdown isn’t like that. When you create a Markdown-formatted file, you add Markdown syntax to the text to indicate which words and phrases should look different.
For example, to denote a heading, you add a number sign before it (e.g., # Heading One
). Or to make a phrase bold, you add two asterisks before and after it (e.g., **this text is bold**
). It may take a while to get used to seeing Markdown syntax in your text, especially if you’re accustomed to WYSIWYG applications. The screenshot below shows a Markdown file displayed in the
Visual Studio Code text editor.
You can add Markdown formatting elements to a plaintext file using a text editor application. Or you can use one of the many Markdown applications for macOS, Windows, Linux, iOS, and Android operating systems. There are also several web-based applications specifically designed for writing in Markdown.
Depending on the application you use, you may not be able to preview the formatted document in real time. But that’s okay. According to Gruber, Markdown syntax is designed to be readable and unobtrusive, so the text in Markdown files can be read even if it isn’t rendered.
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.
Advantages Of Markdown:
- It’s not made just for programmers, because you can write E-Books with it using leanpub.
- Convertible to formats like PDF, HTML, docs etc.
- You can format your mail using markdown with MarkdownHere.
- It is heavily used to write formatted pages across various platforms like StackOverflow, Github and many more.
- Markdown Files can be converted to webpages using tools like Github Pages, blot.im and smallvictori.es.
-
Markdown is portable. Files containing Markdown-formatted text can be opened using virtually any application. If you decide you don’t like the Markdown application you’re currently using, you can import your Markdown files into another Markdown application. That’s in stark contrast to word processing applications like Microsoft Word that lock your content into a proprietary file format.
-
Markdown is platform independent. You can create Markdown-formatted text on any device running any operating system.
-
Markdown is future proof. Even if the application you’re using stops working at some point in the future, you’ll still be able to read your Markdown-formatted text using a text editing application. This is an important consideration when it comes to books, university theses, and other milestone documents that need to be preserved indefinitely.
It would be really helpful if you know the basics of Web Formatting, but no need to worry if you don’t, we will cover everything from Amateur to Professional. Markdown helps in creating all basic elements that you see on a web page like texts, lists, external links, images and many more.
To start writing Markdown code there are plenty of tools available online. As you know the best way of learning something is by doing it. You can start executing code as shown below in any online Markdown editor like Dillinger.
Given below is a syntax which will be useful to learn and later as a cheat sheet for writing Markdown codes.
- Headers
Syntax:
# Header1 ## Header2 ### Header3 #### Header4 ....
- Formatting
Syntax:
*This is Italic* _This is also Italic_ **This is bold** __This is also bold__ __This is a **combination**__
- Lists
Syntax:
1.One 2.Two 3.Three - Elem 1 - Elem 2 * Member * Another Member - Elem Main - Another one - Sub list - It's Member
- Images & Links
Syntax:
IMAGE :  LINK : [GeeksForGeeks](https://www.geeksforgeeks.org/)
- Code & Quotes
Syntax:
``` This is Some Code ``` Here Code is `Inline` . > These are > Some Quotes
This Article is a cheat sheet you can use for Markdown,
For a detailed tutorial on Markdown syntax see daringfireball.net