Read on to learn the ways you can use Markdown in your DataCamp course. The sections of this article have been divided by formatting type so that you can navigate to the relevant section.

Keep in mind that while Markdown syntax may be supported on slides or exercises, that using Markdown is not always an ideal user experience and that your point may be clearer by using plain text. Let’s get started.

Inline code

Inline code is something you will frequently use on many slides and in the majority of your exercises. To create inline code, surround your text with a single backtick. Make sure not to confuse backticks with quotes, as quotes will not format your text. On a standard QWERTY keyboard, the backtick key is in the upper left corner.

Code blocks

In addition to inline code, you can also create code blocks in Markdown. Code blocks require slightly different syntax than inline code. To create a code block, use three consecutive backticks, and then add a line return. Fill in your code line by line just as you would if you were writing a script. Following your last line of code, add a line return and close your code block with three consecutive backticks. On slides, code blocks will render across the entire area of the designated section of the slide. For example, if this slide were a two-column slide, the code block would end halfway through the entire width of the slide. Note, the code will not wrap. If the line of code is wider than the width of the slide or slide section, it will not be visible and you will need to reformat your code.

Headers

Markdown headers are created using the pound or hash symbol. The hash and space should precede the text you will use for your header. The number of hash symbols indicates the header level. The highest header level is one, which is created with just one hash symbol. The higher the header level, the larger the header text will render. You'll notice that in our slides, the text for every header is capitalized. Headers in slides should be used sparingly. Markdown headers should not be used in exercises.

Unordered Lists

An unordered list is simply a list of bulleted items with no inherent order or sequence. To create an unordered list in Markdown, you can use an asterisk, a hyphen, or a plus sign along with your text to create a bullet. Make sure there is a space between the symbol and the text. To create a nested list, you will need to add spaces before your symbol as well. As you can see, all of these symbols render the same on DataCamp slides. We do not support multiple bullet types. DataCamp exercises do not support nested lists.

Ordered Lists

Ordered lists can be created using the number of the item along with a period. Make sure to include a space between the period and your text. Nested ordered lists are not supported.

You can add links to both slides and exercises. The syntax is similar to the syntax for images, so be sure to be aware of the differences. For links, use closed square brackets followed by closed parentheses. The closed parentheses contain your link, while the square brackets contain the name you wish to render for your link. Keep your link names as simple as possible. While the links are not clickable within videos, they will be available and clickable in the PDFs of your slides, which are available to download. Make sure to test out the links in your slides to verify that you have used the correct syntax.

Line breaks

To add an artificial line break to your content, you'll use   which stands for no-break space and is another form of Markdown syntax borrowed from HTML. To ensure a line break, you will need to place the no-break space on its own line. A no-break space gives you approximately double spacing between the lines. Although no-break space is supported in the exercises, they should not be used.

Quotes

To add a quote, use a right or a closing bracket followed by your text, making sure there is a space between the symbol and the text. It is highly advisable not to use quote syntax in exercises.

Tables

You can also create tables in Markdown, which requires a bit more effort than other Markdown syntax, but the results are worth it. To create a table, you will use the following syntax. Note that the vertical pipe symbol separates columns. You will need to add these pipes for every row included in your table. To create the header row for your table, type the text for your headers across one line, and separate each header with a vertical pipe. To ensure your headers render clearly as headers and not another row, you will need to add a row of hyphens below your header row. To do this, use consecutive hyphens. You only need a few hyphens. Lastly, add each of your rows in the same way that you created your header row. Write the contents of the row, and divide it into columns by adding vertical pipes between cells.


As a recap, the following Markdown formatting is supported in:

Slides:

  • Inline code

  • Code blocks

  • Headers (levels 1-5)

  • Unordered lists

  • Nested unordered lists

  • Ordered lists

  • Images

  • Links

  • Line breaks

  • Quotes

  • Tables

Exercises:

  • Inline code

  • Code blocks

  • Headers (level 1 only)

  • Unordered lists

  • Ordered lists

  • Images*

  • Links

  • Line breaks

  • Horizontal lines

  • Quotes

  • Tables

*HTML is supported and allows resizing.

Remember, it’s important to view the final product to ensure that Markdown is rendering as expected and providing a good user experience. Always preview your slides and your exercises before moving onto more content.

Resources

Did this answer your question?