Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML HTML Basics Images, Text and Links Captioning Images

Luis Romero
.a{fill-rule:evenodd;}techdegree seal-36
Luis Romero
Front End Web Development Techdegree Graduate 17,531 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
217,626 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.