I would like to add a warning or note icon in an alert-block in Jupyter notebook
. To create an alert-block in Jupyter notebook we could use the following code:
<div class="alert alert-block alert-info">
<b>Tip:</b> Use blue boxes (alert-info) for tips and notes.
If it’s a note, you don’t have to include the word “Note”.
</div>
Output:
Now I could like to add an icon. In this question it is discussed to add icon in markdown in GitHub. We may use then the syntax :warning:
. This unfortunately doesn't work in Jupyter notebook:
<div class="alert alert-block alert-info">
:warning: Use blue boxes (alert-info) for tips and notes.
If it’s a note, you don’t have to include the word “Note”.
</div>
Output:
As you can see this doesn't work. So I was wondering if anyone knows how to add an icon to an alert-block in Jupyter notebook?
It does work, but that is only a representation of you needing to copy and paste the symbol, hence the '(just copy paste)' note there where you indicated.
> ⚠️ **If you are using mobile browser**: Be very careful here
<div class="alert alert-block alert-info">
⚠️ Use blue boxes (alert-info) for tips and notes.
If it’s a note, you don’t have to include the word “Note”.
</div>
Test temporary Jupyter session, with no login needed, provided via the MyBinder service from here.