Markdown Introduction
Let me tell you a little secret: You already know Markdown, you just don’t know it.
Am I full of crap in this Markdown Introduction? Certainly not, I am actually dead serious. Let me tell you what markdown is:
Text styling for mortals
or if you want the (boring) official definition from Wikipedia
Markdown is a plain text formatting syntax designed so that it optionally can be converted to HTML using a tool by the same name.
Told you my definition was cooler 🙂
This in plain English means, Markdown allows you to write a styled document without using some of the really weired styling syntaxes. For the rest of this article we will assume that we use Markdown to write HTML, if you need anything else, Google is your friend 🙂
Let us study some example to see the power of Markdown. Consider writing a header in HMTL, you would write:
1
<h1>Your Title</h1>
that is 9 symbols to encode a header. Now lets use Markdown
1
# Your Title
we use 1 symbol in markdown. Cool no?
Or take something as common as a list (who doesn’t love lists…):
1
2
3
4
<ul>
<li>Item 1</li>
<li>Item 2</li>
<ul>
and compare the above HTML version to the below Markdown:
1
2
- Item 1
- Item 2
I officially have a cramp in my hand after writing this ul list without Emmet ( a story for another day…).
Lets us look at some more examples, take just a simple paragraph
1
<p>Some paragraph.</p>
against
1
Some paragraph
In short to write a paragraph you have to do nothing. This is very similar to the WordPress content editor.
One final example to have our list of the most used Markup commands complete: A link:
1
<a href="http://somelink.com">Link</a>
and our Markdown sample:
1
[Link](http://somelink.com)
I think I did enough convincing for you to see why Markdown is awesome.
Let us talk what speaks against Markdown?
- It is only a subset of HTML, meaning you can not do all HTML functionality. For example if you needed classes or some HTML 5 tags.
- You have to process it (compile it) to get to actual HTML if you want it to display nicely.
Ugh, number 2 is in reality what really kills Markdown quite a bit. The second you have to compile (convert) something it becomes less usable for the average joe.
Let me focus for the rest of this post about how to use Markdown with WordPress and Evernote.
Markdown Cheatsheet
Markdown | HTML | |
---|---|---|
Header | # Your Title | <h1>Your Title</h1> |
Paragraph | Some paragraph | <p>Some paragraph.</p> |
List | - Item 1 - Item 2 | <ul> <li>Item 1</li> <li>Item 2</li> <ul> |
Link | [Link](http://somelink.com) | <a href="http://somelink.com">Link</a> |
and just in case you were curious how this table above looks in Markdown:
1
2
3
4
5
6
7
| Markdown | HTML
---| --- | ---
Header | `# Your Title` | `<h1>Your Title</h1>`
Paragraph | `Some paragraph` | `<p>Some paragraph.</p>`
List | `- Item1` `-Item2` | `<ul> <li>Item 1</li><li>Item 2</li><ul>`
Link | `[Link](http://somelink.com)` | `<a href="http://somelink.com">Link</a>`
Blog with Markdown in WordPress using Evernote
Check out this next post of this series: Blog with Markdown in WordPress using Evernote. Let me know if you have any questions in the comments below.