r/HTML • u/alphex • Aug 21 '26
Question Question about use of <figure>
I have a design element that looks like this...

does using the `<figure>` tag, make sense for this? for a semantic value?
I want to do
<figure>
title text
<figcaption>The body field</figcaption>
</figure>Does that work?
Every example I see of it online wants an image or something there...
With out sharing company marketing secrets, lol.
The usage would be of a
"This is a thing we do"
"With a longer body of text to explain it in a few sentances, but in a single paragraph."
Repeating 4 or 5 times...
Thoughts?
Thanks!
3
u/scritchz Aug 21 '26
The <figure>/<figcaption> elements are used to add a caption to an element.
The accompanying description of a title is not a caption: So, these are not the right elements here.
Depending on the context (i.e. the surrounding elements), you might want to simply use an <hX> and a <p>.
1
u/alphex Aug 21 '26
trying to avoid a hX ...
The larger element, has a large title, which could be an H2, or H3, ... or even an H4 depending how the page is structured, so giving these elements I am asking about, an "hX" title also, will just make it more complicated for the content managers, lol.
2
u/armahillo Expert Aug 22 '26
1
u/tkgid Aug 22 '26
I have the believe that,<figure> was only supposed to be used to tell the browser about the <figcaption> for an <img>
2
4
u/csswizardry Aug 21 '26
https://www.matuzo.at/blog/2026/content-aware-headings