Can <figure> be used without <figcaption>?

QuestionsQuestions8 SkillsProImage Rotate on HoverOct, 19 2025
0162

Yes, the <figure> element can be used without a <figcaption>. While the <figcaption> is optional and provides a caption for the content, it is not required. You can use <figure> solely to group an image or illustration, and it will still serve its purpose of indicating that the content is self-contained.

Here’s an example:

<figure>
    <img src="https://picsum.photos/id/1015/400/400.jpg" alt="Sample Image" />
</figure>

In this case, the <figure> element contains only the image, and it is perfectly valid HTML.

0 Comments

no data
Be the first to share your comment!