JSFiddle - React, Tailwind, and code Playground

HTML

Captioned image use case.

<div contentEditable=true>
Case 1: just use divs.
<div contentEditable=false style="border: 2px dashed; display: inline-block; padding: 3px">
<img src="https://lh4.googleusercontent.com/-_AJ_FcGXwC4/UXO4gLCsExI/AAAAAAAAG1Q/eFw4P0Sj7h4/s400/164.gif">
<div style="text-align:center" contentEditable=true>Look at my amazing cat!</div>
</div>
Stuff after the image.
</div>

<br>

<div contentEditable=true>
Case 2: use a table.
<table contentEditable=false style="border: 2px dashed; display: inline-block; padding: 3px">
<tr><td>
<img src="https://lh4.googleusercontent.com/-_AJ_FcGXwC4/UXO4gLCsExI/AAAAAAAAG1Q/eFw4P0Sj7h4/s400/164.gif">
</td></tr>
<tr><td style="text-align:center" contentEditable=true>Look at my amazing cat!</td></tr>
</table>
Stuff after the image.
</div>