What Is It?
Markdown is a plain text formatting syntax aimed at making writing for the internet easier. The philosophy behind Markdown is that plain text documents should be readable without tags mussing everything up, but there should still be ways to add text modifiers like lists, bold, italics, etc. It is an alternative to WYSIWYG (what you see is what you get) editors, which use rich text that later gets converted to proper HTML.
It’s possible you’ve encountered Markdown without realizing it. Facebook chat, Skype, and Reddit all let you use different flavors of Markdown to format your messages.
Here’s a quick example: to make words bold using Markdown, you simply enclose them in (asterisks). So, bold word* would look like bold word when everything is said and done.
All told, Markdown is a great way to write for the web using plain text.
Why Use It?
It’s Easy to Learn and Fast to Use
Markdown is dead simple to learn. The official syntax what you’ll need to know is that typing word will make it bold, typing word or word will italicize the word, links are written like this anchor text, and lists are written exactly how you’d expect: just hit enter and add any of these three characters at the start of each line: -, *, +. So that this will become this:
Or you could always use a tutorial to learn how to write Markdown
So typing Markdown is almost always faster than writing with a rich text editor, especially when you start getting into things like links or bulleted lists, which either make you use the mouse or force you to memorize a complicated sequence of keyboard shortcuts. One caveat is that if you need complicated text elements, such as tables, you’re better off sticking to HTML. Fortunately, Markdown has full HTML support, so you can code a table in HTML and go right back to Markdown in the same document.
Plus, it’s much easier to read raw Markdown than it is to read raw HTML. Which, you know, was part of the reason Markdown was even invented.
It Converts to HTML Easily
Now, if you’re going to be writing HTML, you should just…write HTML. But if you’re, say, writing an email or a readme file where you need HTML’s formatting options but not the full breadth of its features, Markdown is perfect.
Markdown converts to HTML flawlessly, sparing you the hassle of opening and closing all those tags. So. Many. Tags.
In fact, Markdown has the software to convert the plain text to HTML built in! So Markdown is actually a text-to-HTML conversion software in addition to being a markup language.
Plus, have you ever tried to convert from a .docx file to HTML? You often get so much extra formatting and spacing that it’s not worth the effort.
Markdown is Futureproof
By “futureproof,” we mean that Markdown is a plain text format. For as long as plain text is the standard (which it will be for a long, long time), Markdown will be usable and openable by modern programs. Compare this to Microsoft Word, which has 8 different filetypes as of 2018. Keeping things plain text ensures there will never be an outdated version, so software doesn’t need to update to keep up with the format.
Markdown does have its own filename extension: .md, but it was designed to be perfectly readable as a raw text file. So it’s safe to say that Markdown isn’t going anywhere.
The Markdown Syntax - A Quick Primer
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.
You will see preview as: