What is Markdown and How to Format Text with Markdown

Markdown is a simple syntax that formats text as headings, lists, bold text, etc. This markup language is popular and there are certainly applications that support it. Here’s a rundown of what Markdown is and how and where you can use it.

What is Markdown and how to use it

What is Markdown?

When you add bold, italic, numbered lists, bullets, headings, etc. to your text, you are “formatting” it. Markdown is a syntax—or, a set of rules—formats text on web pages.

Traditionally, to format text on web pages, people used Hypertext Markup Language, also known as HTML. HTML is a member of the markup language family, along with the eXtensible Markup Language (XML) and the Standard Generalized Markup Language (SGML).

To format text in HTML, you place tags around the text. For example, if you want the text to be bold, you would type “ this is bold text ”.

When your web browser “reads” a web page, it interprets the HTML tags and applies the relevant formatting. When it sees “ this is bold text ”, it understands that anything between the and tags must appear in bold. The browser also hides the tags ( and ).

HTML can be quite complex, with dozens and hundreds of tags, such as ,

, ,

    , and many more. Computers have no trouble reading them because they just follow the syntax (the rules of HTML) and apply proper formatting to the tags.

    However, tags make it quite difficult for humans to read HTML and understand what the text will look like after the computer renders it. It's not "user-friendly" for people who don't have a lot of experience reading it.

    On the other hand, Markdown means “as easy to read and as easy to write as possible”. John Gruber and Aaron Schwartz explain why they created Markdown in 2004 and provide syntax instruction on the Gruber website.

    In short, Markdown makes formatting text for web pages easier because its tags are simpler than HTML and they automatically convert to HTML. This means you don't need to know HTML to write something for a web page because Markdown will translate your tags into HTML on your behalf.

    It does not include all possible HTML tags, but instead the most common formatting options.

    How to use Markdown

    To use Markdown, you just need to apply simple tags to your text. For example, to format text in italics, you would put an underscore around it like this: _this is italicized text_.

    Here are some more examples of Markdown formatting:

    # This is an H1

    ## This is an H2

    ###### This is an H6

    Bullet Points

    * Red
    * Green
    * Blue

    Numbered Lists

    1. Bird
    2. McHale
    3. Parish

    Emphasis (Italics)


    Markdown converts both * *text* and _text_ into HTML or tags that, in theory, can be interpreted in many ways. For example, you can create an application that interprets the tag as flashing red text. In practice, however, almost every application (including any web browser) interprets it as italic text.

    Strong (Bold)


    Markdown converts both text and __text__ into HTML tags, which usually appear as bolded text. In other words, for extra emphasis, use double * or _ characters.

    There are also variations of Markdown – such as CommonMark and GitHub Flavored Markdown (GFM) – but all are based on the Markdown specification. Variants usually just extend the standard by adding formatting tags that Markdown doesn't have.

    After you format your text, an application must convert it to HTML, which is usually done automatically. For example, README files in GitHub use Markdown, and as long as they have the .MD file extension, GitHub will automatically convert them to the correct HTML tags when they are rendered.

    So in most cases you won't have to do this yourself, but if you do, there's also a Markdown tool available for you.

    Where can you use Markdown?

    As I mentioned above, you can use Markdown on GitHub, but also on Reddit, StackOverflow, and other sites. If you've ever formatted text in WhatsApp messages or Slack chats, you've used it because these apps use a (very small) subset of Markdown tags to format text.

Leave a Reply