Recently I want to beautify my blog. My blogs are edited with HTML rich editor that is hard to control blog’s style. Someone advise me to use markdown to write blog, it has a markup language for the conversion between text and html. It support the plain text formatting syntax and a tool to convert the plain text formatting to HTML. The easy-to-read and easy-to-write plain text syntax is its advantage. Then I choose the editor Typora to practice.
Typora is a very brief editor that has no rich UI but is very clear to use. You can use the shortcuts to use all the MD syntaxes. And it give you a seamless experience as both a reader and a writer. WYSIWYG. Really cool !!! It has all versions for Mac, window, Linux. Not instruct how to download and install.
MD is a markup language for formatting text. So we need to learn its formatting syntax. It can render kinds of title, sorted list, unsorted list, table, code, link, image and so on. It can display most of HTML function. Using MD, you will not write much html tag and get a beautiful formatted article.
Every MD syntax will be translated to a html tag. The final result is also a html document. So it is ok to insert some html code into markdown. The below table show some some simple example about the translation.
Markdown | HTML |
---|---|
## This is a title | <h2>This is a title</h2> |
Heading level 2 --------------- | <h2>This is a title</h2> |
*bold text* | <em>bold text</em> |
_bold text_ | <em>bold text</em> |
**bold text** | <strong>bold text</strong>. |
_bold text_ | <strong>bold text</strong> |
***bold text*** | <strong><em>bold text</em></strong> |
1. First item 2. Second item 3. Third item 4. Fourth item | <ol> <li>First item</li> <li>Second item</li> <li>Third item</li> <li>Fourth item</li> </ol> |
- First item - Second item - Third item - Fourth item | <ul> <li>First item</li> <li>Second item</li> <li>Third item</li> <li>Fourth item</li> </ul> |
Typora editor sets many shortcuts for common MD syntax. It make you easy to create specified elements and edit it’s attributes. And Typora render the document immediately and display it. WYSIWYG. You also can change to source code mode, convenient to do custom operation.
Basic MD syntax: https://www.markdownguide.org/basic-syntax
Extended MD syntax: https://www.markdownguide.org/extended-syntax