Connect with us


What Is Markdown, and How Do You Use It?



Markdown logo on a blue background

Markdown is an easy syntax that codecs textual content as headers, lists, boldface, and so forth. This markup language is widespread, and also you undoubtedly have apps that assist it. Right here’s a fast primer on what Markdown is, and the way and the place you should use it.

What Is Markdown?

If you add daring, italics, numbered lists, bullet factors, headings, and so forth to textual content, you’re “formatting” it. Markdown is a syntax—or, algorithm—that codecs textual content on net pages.

Historically, to format textual content on net pages, folks used Hypertext Markup Language, higher often called HTML. HTML is one member of the household of markup languages, together with eXtensible Markup Language (XML) and Commonplace Generalized Markup Language (SGML).

To format textual content with HTML, you set tags across the textual content. For instance, if you wish to daring textual content, you kind “<b> that is some daring textual content </b>”.

When your net browser “reads” an online web page, it interprets the HTML tags and applies the related formatting. When it sees “<b> that is some daring textual content </b>”, it understands that something between the <b> and </b> tags ought to seem in daring. The browser additionally hides the tags (<b> and </b>).

HTML may be fairly complicated, with dozens and dozens of tags, akin to <span>, <div>, <kbd>, <ol>, and many others. Computer systems don’t have any hassle studying these as a result of they only comply with the syntax (the principles of HTML) and apply the formatting that matches the tags.

The tags, nonetheless, make it fairly troublesome for people to learn HTML and perceive how the textual content will take care of the pc renders it. It’s not very “user-friendly” for individuals who don’t have numerous expertise studying it.

RELATED: How to View the HTML Source in Google Chrome

Markdown, then again, is supposed “to be as easy-to-read and easy-to-write as is feasible.” John Gruber and Aaron Schwartz clarify why they created Markdown in 2004 and supply a information to the syntax on Gruber’s website.

In brief, Markdown makes it simpler to format textual content for net pages as a result of its tags are easier than HTML, they usually convert to HTML robotically. This implies you don’t need to know HTML to jot down one thing for an online web page as a result of Markdown interprets your tags into HTML for you.

It doesn’t cowl all doable HTML tags, however, moderately, the most typical formatting choices.

How Do You Use Markdown?

To make use of Markdown, you simply apply easy tags to your textual content. For instance, to format textual content in italics, you set underscores round it like so: _this is a few textual content in italics_.

Listed here are another examples of Markdown formatting from the syntax guide:


# That is an H1

## That is an H2

###### That is an H6

Bullet Factors

* Purple
* Inexperienced
* Blue

Numbered Lists

1. Chicken
2. McHale
3. Parish

Emphasis (Italics)

*textual content*

Markdown converts each *textual content* and _text_ to the HTML <emphasis> or <em> tag, which, in concept, may be interpreted in some ways. For instance, you may construct an app that interprets the <emphasis> tag as flashing purple textual content. In apply, nonetheless, virtually each software (together with each net browser) interprets it as italicized textual content.

Sturdy (Daring)

**textual content**

Markdown converts each **textual content** and __text__ to the HTML <sturdy> tag, which usually seems as bolded textual content. In different phrases, for added emphasis, use double * or _ characters.

There are additionally variants of Markdown—akin to CommonMark and GitHub Flavored Markdown (GFM)—however these are all based mostly on the unique Markdown specification. Variants often simply lengthen the usual by including formatting tags the unique Markdown doesn’t cowl.

After you format your textual content, an software has to transform it to HTML, which is often completed robotically. For instance, README information in GitHub use Markdown, and so long as they’ve a .MD file extension, GitHub robotically converts them to the right HTML tags after they’re revealed.

So, normally, you gained’t have to do that your self, however for those who do, there’s a Markdown tool accessible.

RELATED: What Is GitHub, and What Is It Used For?

The place Can You Use Markdown?

As we talked about above, you should use Markdown on GitHub, but in addition on Reddit, StackOverflow, and different web sites. In case you’ve ever formatted text in WhatsApp messages or Slack conversations, you’ve already used it as a result of these functions use a (very small) subset of Markdown tags to format textual content.

If you wish to study Markdown, try the unique Markdown syntax guide or a third-party tutorial site. It’s straightforward to study, and it’ll make your README information, and Reddit or StackOverflow feedback simpler for others to learn.

Continue Reading
Click to comment

You must be logged in to post a comment Login

Leave a Reply

Copyright © 2022