Markdown Language Cheat Sheet



R Markdown Cheat Sheet learn more at rmarkdown.rstudio.com rmarkdown 0.2.50 Updated: 8/14 1. Workflow R Markdown is a format for writing reproducible, dynamic reports with R. Use it to embed R code and results into slideshows, pdfs, html documents, Word files and more. To make a report. Jupyter Notebook Markdown Cheatsheet. Jupyter Notebook is a great tool for data analysis. And one of its greatest features is that you can easily combine runnable code with rich-text annotations. Markdown cells that contain such annotations support both HTML and Markdown syntax. Markdown is a simple way to format text that looks great on any device. It doesn’t do anything fancy like change the font size, color, or type — just the essentials, using keyboard symbols you already know.

Overview

Markdown language cheat sheet

The basic syntax outlined in John Gruber’s original design document added many of the elements needed on a day-to-day basis, but it wasn’t enough for some people. That’s where extended syntax comes in.

Several individuals and organizations took it upon themselves to extend the basic syntax by adding additional elements like tables, code blocks, syntax highlighting, URL auto-linking, and footnotes. These elements can be enabled by using a lightweight markup language that builds upon the basic Markdown syntax, or by adding an extension to a compatible Markdown processor.

Availability

Not all Markdown applications support extended syntax elements. You’ll need to check whether or not the lightweight markup language your application is using supports the extended syntax elements you want to use. If it doesn’t, it may still be possible to enable extensions in your Markdown processor.

Lightweight Markup Languages

There are several lightweight markup languages that are supersets of Markdown. They include Gruber’s basic syntax and build upon it by adding additional elements like tables, code blocks, syntax highlighting, URL auto-linking, and footnotes. Many of the most popular Markdown applications use one of the following lightweight markup languages:

Markdown Processors

There are dozens of Markdown processors available. Many of them allow you to add extensions that enable extended syntax elements. Check your processor’s documentation for more information.

Tables

To add a table, use three or more hyphens (---) to create each column’s header, and use pipes (|) to separate each column. You can optionally add pipes on either end of the table.

The rendered output looks like this:

SyntaxDescription
HeaderTitle
ParagraphText

Cell widths can vary, as shown below. The rendered output will look the same.

Tip: Creating tables with hyphens and pipes can be tedious. To speed up the process, try using the Markdown Tables Generator. Build a table using the graphical interface, and then copy the generated Markdown-formatted text into your file.
Markdown

Alignment

You can align text in the columns to the left, right, or center by adding a colon (:) to the left, right, or on both side of the hyphens within the header row.

The rendered output looks like this:

SyntaxDescriptionTest Text
HeaderTitleHere’s this
ParagraphTextAnd more

Formatting Text in Tables

You can format the text within tables. For example, you can add links, code (words or phrases in backticks (`) only, not code blocks), and emphasis.

You can’t add headings, blockquotes, lists, horizontal rules, images, or HTML tags.

Escaping Pipe Characters in Tables

You can display a pipe (|) character in a table by using its HTML character code (|).

Fenced Code Blocks

The basic Markdown syntax allows you to create code blocks by indenting lines by four spaces or one tab. If you find that inconvenient, try using fenced code blocks. Depending on your Markdown processor or editor, you’ll use three backticks (```) or three tildes (~~~) on the lines before and after the code block. The best part? You don’t have to indent any lines!

Markdown Language Cheat Sheet

The rendered output looks like this:

Tip: Need to display backticks inside a code block? See this section to learn how to escape them.

Syntax Highlighting

Many Markdown processors support syntax highlighting for fenced code blocks. This feature allows you to add color highlighting for whatever language your code was written in. To add syntax highlighting, specify a language next to the backticks before the fenced code block.

The rendered output looks like this:

Footnotes

Markdown font size

Footnotes allow you to add notes and references without cluttering the body of the document. When you create a footnote, a superscript number with a link appears where you added the footnote reference. Readers can click the link to jump to the content of the footnote at the bottom of the page.

To create a footnote reference, add a caret and an identifier inside brackets ([^1]). Identifiers can be numbers or words, but they can’t contain spaces or tabs. Identifiers only correlate the footnote reference with the footnote itself — in the output, footnotes are numbered sequentially.

Add the footnote using another caret and number inside brackets with a colon and text ([^1]: My footnote.). You don’t have to put footnotes at the end of the document. You can put them anywhere except inside other elements like lists, block quotes, and tables.

The rendered output looks like this:

Here’s a simple footnote,1 and here’s a longer one.2 Tv download for mac.

  1. This is the first footnote. ↩

  2. Here’s one with multiple paragraphs and code.

    Indent paragraphs to include them in the footnote.

    { my code }

    Add as many paragraphs as you like. ↩

Heading IDs

Many Markdown processors support custom IDs for headings — some Markdown processors automatically add them. Adding custom IDs allows you to link directly to headings and modify them with CSS. To add a custom heading ID, enclose the custom ID in curly braces on the same line as the heading.

The HTML looks like this:

Linking to Heading IDs

You can link to headings with custom IDs in the file by creating a standard link with a number sign (#) followed by the custom heading ID.

MarkdownHTMLRendered Output
[Heading IDs](#heading-ids) <a href='#heading-ids'>Heading IDs</a>Heading IDs

Other websites can link to the heading by adding the custom heading ID to the full URL of the webpage (e.g, [Heading IDs](https://www.markdownguide.org/extended-syntax#heading-ids)).

Definition Lists

Some Markdown processors allow you to create definition lists of terms and their corresponding definitions. To create a definition list, type the term on the first line. On the next line, type a colon followed by a space and the definition.

The HTML looks like this:

Vkmusic for mac os x. The rendered output looks like this:

First Term
This is the definition of the first term.
Second Term
This is one definition of the second term.
This is another definition of the second term.

Strikethrough

You can strikethrough words by putting a horizontal line through the center of them. The result looks like this. This feature allows you to indicate that certain words are a mistake not meant for inclusion in the document. To strikethrough words, use two tilde symbols (~~) before and after the words.

The rendered output looks like this:

The world is flat. We now know that the world is round.

Task Lists

Task lists allow you to create a list of items with checkboxes. In Markdown applications that support task lists, checkboxes will be displayed next to the content. To create a task list, add dashes (-) and brackets with a space ([ ]) in front of task list items. To select a checkbox, add an x in between the brackets ([x]).

The rendered output looks like this:

Emoji

There are two ways to add emoji to Markdown files: copy and paste the emoji into your Markdown-formatted text, or type emoji shortcodes.

Copying and Pasting Emoji

In most cases, you can simply copy an emoji from a source like Emojipedia and paste it into your document. Many Markdown applications will automatically display the emoji in the Markdown-formatted text. The HTML and PDF files you export from your Markdown application should display the emoji.

Tip: If you're using a static site generator, make sure you encode HTML pages as UTF-8.

Using Emoji Shortcodes

Some Markdown applications allow you to insert emoji by typing emoji shortcodes. These begin and end with a colon and include the name of an emoji.

The rendered output looks like this:

Gone camping! ⛺ Be back soon.

That is so funny! 😂

Note: You can use this list of emoji shortcodes, but keep in mind that emoji shortcodes vary from application to application. Refer to your Markdown application's documentation for more information.

Automatic URL Linking

Many Markdown processors automatically turn URLs into links. That means if you type http://www.example.com, your Markdown processor will automatically turn it into a link even though you haven’t used brackets.

The rendered output looks like this:

Disabling Automatic URL Linking

If you don’t want a URL to be automatically linked, you can remove the link by denoting the URL as code with backticks.

The rendered output looks like this:

http://www.example.com

Take your Markdown skills to the next level.

Learn Markdown in 60 pages. Designed for both novices and experts, The Markdown Guide book is a comprehensive reference that has everything you need to get started and master Markdown syntax.

Get the Book
Want to learn more Markdown?

Don't stop now! 😎 Star the GitHub repository and then enter your email address below to receive new Markdown tutorials via email. No spam!

Markdown is a lightweight markup language, like Creole, JsonML, or Texy!. The lightweight markup languages have a simple, intuitive syntax making them useful for various text editors and wikis.

Markdown was created by John Gruber and Aaron Swartz in 2004. It is widely used for annotating readme files and curating rich-text messages. Markdown is very useful for creating rich-text formatting using a normal, plain text editor.

In this post, we are going to take a look at some of the most useful and frequently used features of this language. This Markdown cheat sheet is going to come in handy for anybody dabbling in it.

One thing to note here is that some of the features listed here are not fully supported by Markdown and needs additional support from the editor. But any new editor should do a good job.

Here’s the list of what we cover in this article:

Markdown Bullet List


1. Heading

You can create a heading by using an adequate number of hashes (‘#’). You can control the size of the heading by reducing or increasing the number of hashes.

### Big Header
## Bigger Header
# Biggest Header

2. Bold

The bold effect can be achieved using either the double star (‘**’) or the double underscore (‘__’). You need to wrap the text in any one of the mentioned symbols.

**Bold text created using the double star.**
__Bold text created using the double underscore.__

3. Italics

Italicized text can be created by using either the single star (‘*’) or the single underscore (‘_’). Just like the bold, you need to wrap the text in any one of these characters.

*Italicised text created using the single star.*
_Italicised text created using the single underscore._

Note: You can create the bold and italics effects together also (in case you want a ‘bold italicized’ piece of text). Be sure to close them properly as it can get pretty messy.

4. Blockquote

Quotes are very useful for writing messages or emails. To create a quoted text, you use the forward angle bracket (‘>’). There is a useful feature that some editors support. In case you have a very long passage to quote, you can conveniently place each sentence in a new line starting with a forward angle bracket.

You could shove everything in a single looooooooong line as well, but that’s simply less useful. This makes the source file much cleaner and readable.

> This is the first line.
> This is the second line. They are going to be part of the same quote. Cool!

> This is a very, very, very long line. This is going to look the same as before, but it’s much better to break this line into multiple parts if possible.

5. Strikethrough

Just like bold or italics, you need to wrap the text in the double tilde (‘~~’).

~~To create the strikethrough effect, use a double tilde.~~

6. Horizontal Rule

There are some ambiguities as to how a horizontal rule could be created. The original Markdown required the use of a triple hyphen (—) for creating a horizontal rule. But many editors these days support some other syntaxes as well such as the triple asterisk (***) and triple underscore (___).

This text is before the horizontal rule.
***
This text is after the horizontal rule.

Cheat

7. Code

Often you would need to include a piece of code in your text. Markdown lets you include code very easily. In fact, you can include the code using two different methods.

The first way is to simply wrap the code inside single backticks (‘`’). This is the preferred way if you want an inline code i.e. any text in the same line before and after the code would be rendered in the same line.

This text is before the code. `This is a piece of code surrounded by backticks.` This text is after the code.

The second method is to use what is popularly known as ‘fenced code blocks’. A piece of code surrounded by triple backticks (‘“`’) would be rendered separately from the text preceding and following it.

“`
This is a piece of code surrounded by triple backticks.
“`

Note: While rendering codes is an inherent feature of Markdown, code highlighting is not. That being said, many modern editor support code highlighting anyway. You need to mention the language that you are using immediately after the opening triple backticks.

Markdown Language Cheat Sheet Pdf

8. List

Lists are useful for creating numbered collections. There is, in fact, no special syntax for creating one. You simply write to them as you would have normally written, and the Markdown editor would take care of the rest.

  1. The first line.
  2. The second line.
  3. The third line.

9. Unordered List

Unordered lists are different from the ordered lists in that they don’t include the number, instead use a bullet symbol. The items can be specified using a hyphen (‘-‘), plus (‘+’), or asterisk (‘*’).

– The first item.
+ The second item.
* The third item.

10. Table

Cheatsheet Markdown

Markdown inherently does not support tables, although most of the modern Markdown editors support them. The columns are denoted by pipes (‘|’) while hyphens (‘-‘) are used to separate the heading and the rest of the rows.

| Product | Quantity | Price |
| ——– | ——— | —– |
| Milk | 1 liter | $1 |
| Butter | 0.5 kg | $3 |
| Tuna | 1 kg | $30 |

11. Links

There are many different ways to include an anchor or hyperlink in the document. You need to use the square brackets (‘[]’) for specifying the text while parentheses (‘()’) is used to specify the webpage (plus the optional description).

[This is a link without description.](https://www.google.com)

[This is a link with description.](https://www.google.com “Google knows everything!”)

12. Images

Including an image in your document is somewhat similar to including a link. Here you need to specify an alternate text inside the square brackets (‘[]’) while the link to the image is specified inside the parentheses (‘()’). Just like links, you can also specify an optional description.

![alt text](https://s16458.pcdn.co/wp-content/uploads/2020/01/logo-1.png “ByteScout!!”)

13. YouTube Videos

Including videos is not very straightforward, and it is mostly up to the editors (rather than Markdown). Following is a way to attach a video, although it cannot be played directly (it simply redirects the user to where the video is located).

[![IMAGE ALT TEXT HERE](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png)](https://youtu.be/6A5EpqqDOdk)

About the Author

ByteScout Team of WritersByteScout has a team of professional writers proficient in different technical topics. We select the best writers to cover interesting and trending topics for our readers. We love developers and we hope our articles help you learn about programming and programmers.