Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Basics Images, Text and Links Captioning Images

Luis Romero
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Luis Romero
Front End Web Development Techdegree Graduate 18,596 Points

Can we have inside figure tag, multiples img - figcaption pairs?

Can we have inside figure tag, multiples img - figcaption pairs?, or only multiples img tags, and only one figpaction for all the images?

I listened that Guil talk about multiples img tags, but not about figcation tags for every img.

thank you.

1 Answer

Steven Parker
Steven Parker
231,275 Points

As defined on the MDN page, a figure element should have at most one figcaption, as either the first or last child. Otherwise, it can have any combination of "flow content", so mutilple images would be permitted.

If you want to lincude a figcaption with each image then they should also be in separate figure elements.