Add HTML tag for the code block

We should have the HTML tag for the code block!

You can see that all other elements have an HTML tag.
But the code block doesn’t have.



I strongly agree, but not alone, we would need also the feature request to split all the code.
At the moment everything is added inside one, which is not perfect.
Would be preferable to have seperate tab like with Oxygen Builder:
• JavaScript

So with the HTML Tag change, we could change this directly for the div code block and then remove 1 extra div that we won’t need inside the PHP / HTML code editor.

Thank you for considering this!


Any solution for the code block to set an HTML tag to it at the moment?
Any help is appreciated.

It has a div as html tag. Maybe in some future version we’re able to unwrap the codeblock like in Oxygen but for now that’s the state.

1 Like

ya I know it’s wrapped in a div…
I wanted to switch it to ul… but it seems not possible, just saw some solutions that could work with PHP but will produce issues later on :frowning_face:

This will probably have functional reasons.
However, I see no problem with writing the li tag as semantics in the codeblock (without knowing your exact case).

Another solution is maybe to write the custom code into advanced code / wp codebox or similar and render it into a shortcode.

1 Like

It’s PHP code. I have it inserted in all pages.
I could manage the code to set it li, but the parent here (code block) div as you see
2023-01-23 17_02_57-Window