I am trying to align several images that I have nested in a figure element side-by-side. I would like for each image to have its own, individual caption. However, when I add in the they stop aligning side-by-side. This is my current code;
<figure>
<img src="image1.jpg" alt= "image1" width="195" height="195">
<figcaption>image1</figcaption>
<img src="image2.jpg" alt= "image2" width="195" height="195">
<figcaption>image2</figcaption>
<img src="image3.pjg" alt= "image3" width="195" height="195">
<figcaption>image3</figcaption>
<img src="image4.jpg" alt= "image4" width="195" height="195">
<figcaption>image4</figcaption>
</figure>
This doesn't answer your question, but... don't do that.
Only one element may be nested within a
<figure>
You can have many images, but each figure should have a single caption.
Either use a single figcaption for the figure, or change your markup to this: