What is Markdown in Jupyter Notebook with Examples

If you are new to Jupyter Notebook, one of the most useful things you should learn about is the Markdown apart from learning Python. It is a lightweight markup language that is supported by Jupyter Notebook for formatting text in cells.

Using the Markdown option for a cell, you can generate formatted text, including headings, lists, tables, links, images, and more.

This really helps you to add details about the cells and helps to document your Notebook in a rich way.

Getting Started with Markdown in Jupyter Notebook

    The first thing you need to do is, create a new cell, and from the dropdown as you see in the below gif demo, select "Markdown"

    Select Jupyter Notebook Cell as Markdown

    Now whatever you type in the cell will be considered as a markup language text.

Adding headers H1 - H6

    Just like we have the header tags in HTML, we have the options of headers from h1 (biggest text header) to h6 (smallest text header)

    # Heading 1
    ## Heading 2
    ### Heading 3
    #### Heading 4
    ##### Heading 5
    ##### Heading 6
    heading h1 to h6 in Markdown

    Just add # (hash) symbol before you start writing the header. The number of # you add will result in the respective header.

    One # -> Header 1

    Two # -> Header 2

    Three # -> Header 3

    Four # -> Header 4

    Five # -> Header 5

    Six # -> Header 6


      This will look **bold
      This will look *italic
      bold and italic text

    If you know how to write HTML code, you can make use of the HTML tags in markup mode.

    <h1>Heading 1<h1>
    This is <strongbold</strong>

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap