12
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Jupyter notebookにHTMLを表示させる

Posted at

Jupyter notebook内の出力にHTMLを表示させたいとき、いろいろググって、


from IPython.display import HTML
HTML("<h1>Test</h1>")
HTML("<h2>test<h2>")

ってやればOKっていうのを見つけたのに、うまくいかない人は以下のようにdisplayHTMLを囲んでやるとうまくいくかもしれません。

from IPython.display import display, HTML
display(HTML("<h1>Test</h1>"))
display(HTML("<h2>test<h2>"))

image.png

おわり

12
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?