Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make an image float or right-align in a Google Colab markdown cell?

To explain the process that is going on in my notebook code, I use markdown text boxes between snippets of code. I would like to use small images to illustrate the text (a diagram often makes text clearer).

I cannot find a way of having those images floating on the right however. I tried adding tags with CSS styling, but Colab seems to be removing those. I tried wrapping things in , but again no luck there.

enter image description here

like image 603
Wabiloo Avatar asked Oct 20 '25 12:10

Wabiloo


1 Answers

You can also use the now deprecated align attribute on the image tag. https://html.com/attributes/img-align/

Right aligned image

like image 145
Bob Colab Avatar answered Oct 23 '25 07:10

Bob Colab