Markdown is an easy syntax that codecs textual content as headers, lists, boldface, and so forth. This markup language is widespread, and also you positively have apps that assist it. Right here’s a fast primer on what Markdown is, and the way and the place you need to use it.
Whenever 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 internet pages.
Historically, to format textual content on internet pages, folks used Hypertext Markup Language, higher referred to as HTML. HTML is one member of the household of markup languages, together with eXtensible Markup Language (XML) and Normal 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 internet browser “reads” an internet 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 will be fairly complicated, with dozens and dozens of tags, akin to <span>, <div>, <kbd>, <ol>, and plenty of others. Computer systems don’t have any bother studying these as a result of they only observe the syntax (the principles of HTML) and apply the formatting that matches the tags.
The tags, nonetheless, make it fairly tough 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 a variety of expertise studying it.
RELATED: The right way to View the HTML Supply in Google Chrome
Markdown, however, is supposed “to be as easy-to-read and easy-to-write as is possible.” John Gruber and Aaron Schwartz clarify why they created Markdown in 2004 and supply a information to the syntax on Gruber’s web site.
Briefly, Markdown makes it simpler to format textual content for internet pages as a result of its tags are easier than HTML, they usually convert to HTML mechanically. This implies you don’t must know HTML to write down one thing for an internet web page as a result of Markdown interprets your tags into HTML for you.
It doesn’t cowl all potential HTML tags, however, slightly, the most typical formatting choices.
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 below are another examples of Markdown formatting from the syntax information:
# That is an H1
## That is an H2
###### That is an H6
Markdown converts each *textual content* and _text_ to the HTML <emphasis> or <em> tag, which, in principle, will be interpreted in some ways. For instance, you can construct an app that interprets the <emphasis> tag as flashing pink textual content. In observe, nonetheless, nearly each utility (together with each internet browser) interprets it as italicized textual content.
Markdown converts each **textual content** and __text__ to the HTML <robust> tag, which generally 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 normally simply lengthen the usual by including formatting tags the unique Markdown doesn’t cowl.
After you format your textual content, an utility has to transform it to HTML, which is normally carried out mechanically. For instance, README recordsdata in GitHub use Markdown, and so long as they’ve a .MD file extension, GitHub mechanically converts them to the proper HTML tags once they’re printed.
So, generally, you received’t have to do that your self, however should you do, there’s a Markdown software obtainable.
RELATED: What Is GitHub, and What Is It Used For?
The place Can You Use Markdown?
As we talked about above, you need to use Markdown on GitHub, but in addition on Reddit, StackOverflow, and different web sites. For those who’ve ever formatted textual content 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 information or a third-party tutorial web site. It’s straightforward to study, and it’ll make your README recordsdata, and Reddit or StackOverflow feedback simpler for others to learn.