I am attempting to achieve a specific layout where I have images in a list with text placed directly below each image. However, my attempts using <figure>
and <figcaption>
have not been successful.
Below is the HTML code for my list:
<div class="verticalStrip">
<br>
<ul>
<li><img src="image1.png" alt="im1"/></li>
<li>text1</li>
<li><img src="image2.png" alt="im2"/></li>
<li>text2</li>
</ul>
</div>
Unfortunately, this is the result I currently have:
My desired outcome should look like this:
Any assistance on achieving this layout would be greatly appreciated.
UPDATE1: Adding the following CSS rule as suggested in one of the responses:
img { display: block; }
Resulted in the following changes: