Trying to make a "Wikipedia style" box with an image and text below it

Hi, Wikipedia has throughout it little boxes with an image and text, I’ve been experimenting with ways to achieve that, and landed on the code below. Does this seem like a reasonable way to go about it?

https://codepen.io/robertlampe/pen/NEZzKy

Looks ok to me (I am a fan of “separation” so why noy add a slight drop shadow?) you could also try Bootstrap (if you have got that far) - https://robwuk.github.io/Profile_B/ - shows I have 2 boxes for my 2 projects

Aren’t you supposed to use https://www.w3schools.com/tags/tag_figcaption.asp for tasks like these?

Thank you! That tag looks like it would do exactly what I’m trying to do.