Site logo

Archived topic

Custom HTML Element/Tag Label

3 replies · Started by igniteperth on October 7, 2021

Viewing posts 1–4 of 4

I am looking to change the element tag on a group and or container. I was hoping there might be a way to allow for additional tag types.

Specifically I would like to be able to make my group a

<label class"someclass">
additional gb-blocks
</label>

any help or guidance appreciated.

Hi there,

thats not possible without editing the Blocks HTML, which will lead to potential issues ie. the blocks won't render in the editor and the block editor will probably throw an error or warning.

I am not sure what your intention is regarding the <label> element - but its standard application is a caption for a UI eg, Forms. I would recommend reading up on the label semantics before adding 'unusual' content within one:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label

Thanks for the reply, David.

I wanted to make some drop down accordians using css by grouping blocks. As a workaround I've just used html blocks instead.

Glad to be of help

This archived topic is closed to new replies.