Are headings semantic?

So, I’m trying to decide between <label> and <h2> for product names, or ‘Featured Tea’ in the Tea Cozy project, so are headings semantic?

Headings are absolutely semantic. If you are talking about the heading that says, “Tea of the Month” use an h2.

If you are talking about the names of each tea, you will not want to use a heading or <label>, as <label>s are used to associate form control inputs. While, yes, the name of each tea could technically be its title, I would reserve using <h1> - <h6> as introductory headings.

Instead, what you could do is use simple <p> tag or wrap the <img> in a <figure> with the name of the tea in a <figcaption>

Thanks for the help!

1 Like