Whats the proper way to semantically define a dynamic H1 tag?

I have a <h1> tag that I'm splitting into multiple spans for css/animation reasons. What is the correct markup in this case? Should I have <h1><span>AB</span><span>CD</span></h1> or are there other more correct ways of handling it?
2 Replies
ἔρως
ἔρως5mo ago
<span> is like a <div> - absolutely no semantic value at all and that's exactly why they are the perfect element for this what you have there is the equivalent of <h1>ABCD</h1>, in terms of semantics
vinter.
vinter.OP5mo ago
Awesome, thanks!

Did you find this page helpful?