I built my own website using the Hexo framework this week, which supports markdown to write posts. As a complete newbie programmer, I have never heard of Markdown. So I simply made a summary of what is Markdown, and I would like to share it with you. If there are any inaccuracies, you are welcome to correct them:)
CONTENTS
1. What’s Markdown?
2. Why Markdown?
3. How To Use Markdown?(Tools, Syntax)
What’s Markdown?
Markdown is a plain text lightweight markup language created by John Gruber in 2004
- Lightweight means:
- The format is simple.
- Lightweight documents can be flexibly converted into heavyweight documents (such as PDF/Tex/HTML)
To be simple, Markdown is just a programming language used to edit your documents.
- The document we usually edit contains two parts text content + format
- Text content with format adjustment (like typography, marked title, bold font, etc.) can bring readers a better reading experience in a more clear way.
The Markdown document will be further converted to valid XHYML (or HTML)
- Markdown and HTML are compatible. But Markdown is not a substitute for HTML.
- We can just use HTML to edit documents. But HTML is not a plain text format, which requires a lot of cumbersome tags.
The HTML documents converted by Markdown and then rendered with CSS. It becomes a clearly typeset article that we have seen on various platforms on the Internet.
Why Use Markdown?
Markdown can edit your documents quicker through simpler markup syntax.
As mentioned above, we can edit documents directly through HTML.
But if our ultimate goal is to write, and only want to focus on content. Markdown will be the best choice.
The following is a comparison of Markdown and HTML:
Markdown
1 | #Markdown |
HTML
1 | <hi> Markdown </hi> |
The output is the same. You can see that Markdown is obviously more intuitive.
The Pros of Markdown:
Simple syntax, Easy to use
- you can master the basic grammar in half an hour, and write a beautiful formatted document without strong knowledge about programming.
Quickly writing and typesetting
- Compared with our Rich Text Format editor. ( similar to Microsoft Word) You can save a lot of time though Markdown. You no longer need to look around in the complicated toolbar.
- Markdown eliminates the cumbersome style tags of HTML, which greatly improves your writing efficiency.
More readable source code
- Compared with HTML source code with dizzy tags, the plain text Markdown source code is more intelligible for you to read.
Stronger compatibility, flexible format
- Markdown can neatly convert to various formats. (Such as pages, word, HTML, etc.)
The simple and intuitive Markdown language is not only in favour with programmers, which also very helpful for authors,editors and document writers.
How to Use Markdown?
Tool
We actually can use any text editor to write Markdown. (like pages, words) But it’s better for us to download a dedicated Markdown editor.
Through the Markdown editor, you can preview in real-time, use convenient shortcut keys, and have grammar hints. This can hugely improve the efficiency of your output.
You can pick your tool from this link The Ultimate List of the Best Markdown Editors
- You can also download the syntax highlighting plugin within your IDE(Integrated development environment).
- I am using this plugin Markdown All in one in visual studio IDE.
For complete Markdown syntax, see Markdown Cheatsheet
For more detailed and comprehensive info, you can click here for original John Gruber markup
If you like import your Markdown into Medium, see How to import Markdown into Medium