【发布时间】:2021-01-07 20:17:43
【问题描述】:
您好,我正在使用 JupyerLab,并希望呈现一段 HTML 格式的文本:
<div style="background: #DFF0D8; border-radius: 3px; padding: 10px;">
<p><b>Exercise T1 (From the Allen tutorials):</b>
Use <code>np.array</code> to create a 3-dimensional array with the shape (2, 4, 3).
Also, explore how the colon operation works here -- write a sentence on what you find.
</div>
但我收到此错误:
File "<ipython-input-52-dda4835ea64f>", line 1
<div style="background: #DFF0D8; border-radius: 3px; padding: 10px;">
^
SyntaxError: invalid syntax
我做错了什么?很确定我的 HTML 语法没问题,这甚至可以在 JupyterLab IPYNB 笔记本中完成吗?
【问题讨论】:
-
这能回答你的问题吗? How to embed HTML into IPython output?
标签: html jupyter-notebook jupyter-lab