Caption locations can be controlled by using the fig-cap-location option. You can set this to top for positioning the caption above the images (in HTML and PDF formats):
---
format: html
fig-cap-location: top
---
::: {layout-ncol="3"}



:::