Markdown is a simple syntax that formats text as headers, lists, boldface, and so on. This markup language is popular, and you definitely have apps that support it. Here’s a quick primer on what Markdown is, and how and where you can use it.
When you add bold, italics, numbered lists, bullet points, headings, and so on to text, you’re “formatting” it. Markdown is a syntax—or, set of rules—that formats text on web pages.
Traditionally, to format text on web pages, people used Hypertext Markup Language, better known as HTML. HTML is one member of the family of markup languages, along with eXtensible Markup Language (XML) and Standard Generalized Markup Language (SGML).
To format text with HTML, you put tags around the text. For example, if you want to bold text, you type “<b> this is some bold text </b>”.
When your web browser “reads” a web page, it interprets the HTML tags and applies the relevant formatting. When it sees “<b> this is some bold text </b>”, it understands that anything between the <b> and </b> tags should appear in bold. The browser also hides the tags (<b> and </b>).
HTML can be quite complex, with dozens and dozens of tags, such as <span>, <div>, <kbd>, <ol>, and lots of others. Computers have no trouble reading these because they just follow the syntax (the rules of HTML) and apply the formatting that matches the tags.
The tags, however, make it quite difficult for humans to read HTML and understand how the text will look after the computer renders it. It’s not very “user-friendly” for people who don’t have a lot of experience reading it.
Markdown, on the other hand, is meant “to be as easy-to-read and easy-to-write as is feasible.” John Gruber and Aaron Schwartz explain why they created Markdown in 2004 and provide a guide to the syntax on Gruber’s website.
In short, Markdown makes it easier to format text for web pages because its tags are simpler than HTML, and they convert to HTML automatically. This means you don’t have to know HTML to write something for a web page because Markdown translates your tags into HTML for you.
It doesn’t cover all possible HTML tags, but, rather, the most common formatting options.
To use Markdown, you just apply simple tags to your text. For example, to format text in italics, you put underscores around it like so: _this is some text in italics_.
Here are some other examples of Markdown formatting from the syntax guide:
# This is an H1
## This is an H2
###### This is an H6
Markdown converts both *text* and _text_ to the HTML <emphasis> or <em> tag, which, in theory, can be interpreted in many ways. For example, you could build an app that interprets the <emphasis> tag as flashing red text. In practice, however, almost every application (including every web browser) interprets it as italicized text.
Markdown converts both **text** and __text__ to the HTML <strong> tag, which typically appears as bolded text. In other words, for additional emphasis, use double * or _ characters.
There are also variants of Markdown—such as CommonMark and GitHub Flavored Markdown (GFM)—but these are all based on the original Markdown specification. Variants usually just extend the standard by adding formatting tags the original Markdown doesn’t cover.
After you format your text, an application has to convert it to HTML, which is usually done automatically. For example, README files in GitHub use Markdown, and as long as they have a .MD file extension, GitHub automatically converts them to the correct HTML tags when they’re published.
So, in most cases, you won’t have to do this yourself, but if you do, there’s a Markdown tool available.
As we mentioned above, you can use Markdown on GitHub, but also on Reddit, StackOverflow, and other websites. If you’ve ever formatted text in WhatsApp messages or Slack conversations, you’ve already used it because these applications use a (very small) subset of Markdown tags to format text.
If you want to learn Markdown, check out the original Markdown syntax guide or a third-party tutorial site. It’s easy to learn, and it’ll make your README files, and Reddit or StackOverflow comments easier for others to read.
- › How to Make and Combine PDF Files on the Linux Command Line
- › How to Apply Text Formatting on Reddit
- › What Is Plain Text?
- › The Best Note-Taking Apps for Mac
- › How to Show File Explorer’s Preview Pane on Windows 10
- › How to Use pandoc to Convert Files on the Linux Command Line
- › How to Fix Apple Notes Not Syncing Over iCloud
- › Does an Ionic Air Purifier Clean Better Than Standard Units?