Simple tip how to use HTML in Jupyter Notebook

I am preparing course for Python beginners and I was thinking how to do something they can try on their own computers quickly and immediately see results.

I would like to use Google Colab but when you want to present some results you usually want some graphical way for it containing images etc. And what is a better tip than HTML.

Here is a quick tip how to use HTML in your Jupyter Notebook.

from IPython.core.display import display, HTMLdisplay(HTML('<h1>Hello, world!</h1>'))
Google Colab and HTML in Output

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Martin Koníček
Martin Koníček

Written by Martin Koníček

AWS and Python developer and Linux enthusiastic.

Responses (1)

Write a response

(Return before HTML should be after HTML in first box)
In modern python, now looks like
from IPython.display import HTML, display

--