“Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).”
In other words, a variety of programs understand Markdown and can convert it to readable text.
In this article (and in the video below), we’ll take a closer look at Markdown and how it works.
Why do we use Markdown?
Markdown is a simple, beginner-friendly way to format plain text. It’s not the best tool for everything, but it definitely has its place. Here’s an analogy that might help:
If you had an intensive project building furniture, a nail gun would be helpful. It’s fast and powerful. But, if you were hanging up a picture on your wall, a nail gun wouldn’t be right for the job — a hammer and a nail would work just fine and be just as fast.
Similarly, Markdown may not be as full-featured as HTML, but it’s fast, simple, and beginner-friendly. In fact, you may use it from time to time already. Reddit and GitHub both encourage users to format their comments using Markdown. You can also use it in text editors like Evernote.
How does Markdown work?
Gruber, who we heard from earlier, goes on to explain that Markdown is composed of two things:
- A plain text formatting syntax.
- A software tool, written in Perl, that converts plain text formatting to HTML.
Markdown vs. HTML comparison
To help illustrate how Markdown works, let’s take a look at how it compares to HTML. Here’s how you’d create a header, hyperlink, and list in Markdown:
## What is Markdown?
**List of tips**
1. *One asterisk makes the text italicized.*
2. **Two asterisks make the text bold.**
And here’s how the code above will look once rendered:
Of course, you can achieve these effects using Microsoft Word, but it tends to be more tedious. Unless you know the shortcuts for everything, you’re constantly stopping the flow of your writing to bold, italicize, change headings, and make bulleted or numbered lists.
Of course, another option is HTML.
<h2>What is Markdown?</h2>
<a href=”www.markdownlink.com”>See Markdown</a>
<strong>List of tips</strong>
<li><i>One asterisk italicizes</i></li>
<li><strong>Two asterisks bold</strong></li>
This HTML code is written to produce the same result as the Markdown code above. Here’s how it looks once rendered:
As you can see, HTML is more complicated, especially for a beginner. You have to remember to close every tag. It’s very easy to make mistakes. While HTML is somewhat intuitive once you know it, Markdown is significantly more so.
How to use Markdown
You can save files written in Markdown with .Markdown or .md as the extension. From there, you need a Markdown application that’s capable of processing the Markdown file.
Markdown applications use a Markdown processor to take the Markdown text and convert it into HTML, which is then viewable on the web. Or, you can export the Markdown into other formats like PDF or Docx.
Where can Markdown be used?
The best places to use Markdown include:
- Websites: Markdown was designed for the web. It’s especially good for straight-forward, text-heavy sites like blogs. It’s also used on websites with a significant amount of user-generated content, like Reddit and Evernote.
- Documents and notes: If you want to write a quick note or document without having to stop, reach for your mouse, and click buttons to format, Markdown can come in handy. It’s also handy for writing to-do lists, and several apps support it, including WriteMonkey and SublimeText.
- Email: Some email clients (like MailMate and Airmail) support Markdown. You can also write an email in Markdown and export it to your email client or install a browser extension.
- Technical documentation: Writing technical documentation is already involved. It makes sense to use a streamlined formatting system that allows you to focus on what you’re saying rather than your formatting.
How to learn Markdown
The best way to learn Markdown is to use it. Here are some of Markdown’s formatting symbols and what they mean.
There are several online Markdown editors that you can take for a test drive. Markdown Tutorial walks you through a basic tutorial. Dingus is another option for trying out Markdown, and you can find more options here.
Markdown is useful and easy to learn, but it’s also limited. For example, you can’t change colors or fonts. If you want to do more, you’ll need to branch out into other languages, such as HTML/CSS.
HTML provides the structure of web pages. CSS takes things a step further by defining the layout of the page and adding stylistic elements. To start learning either language, check out the courses below:
We also have a Skill Path that teaches you how to build websites from start to finish. It covers HTML, CSS, responsive design, accessibility, and more. You’ll also complete projects that you can add to your portfolio to show off your skills to current or prospective employers.