Split H2 tag in multiple H2 tags and displayed inline

Hi,

I have a dumb question.

I have an h2 that and I want just a single word to be stylized differently from the rest of the h2.

E.g. “This is my AWESOME [CMS TITLE]”… Now I want to stylize the word between the brackets that’s linked to the CMS field… Would it affect the SEO if that one h2 is split into 2 or 3 other h2 and displayed inline?

The best approach is adding a span to a word or words as needed and styling to the span itself.

1 Like

Well, I tried that, but the fields from the CMS can’t be linked with a span inside a title tag or within a paragraph. :frowning: which kind of sucks.

Try use Javascript library letering.js … and some more custom code to achieve what you want
And in nocode just use rich text element so you can divide and use multiples H2

The heading can be a HTML embed, for example:
<h2 class="heading-h2">This is my AWESOME <span class="heading-h2-alt">[CMS FIELD]</span></h2>