Problem Statement
Which HTML5 element combination is best suited for an image gallery layout?
Explanation
figure and figcaption are ideal for image galleries because they provide semantic meaning by grouping an image with its description or caption, improving accessibility and SEO.
Code Solution
SolutionRead Only
<figure> <img src="image.jpg" alt="Beautiful landscape"> <figcaption>Mountain View</figcaption> </figure>
Practice Sets
This question appears in the following practice sets:
