I have a innerhtml
Lets say
<p>
<span>8218819999</span>
<span>hello</span>
</p>
I want add css property for first span tag
How can I do that ?? Using jquery or javascript.
This whole html is coming from AEM Label which I don’t have control over.
Using ngafterviewinit I’m getting the innerhtml But not sure how to update the css.
const span = element.querySelector('p > span:first-of-type')
Add color style
span.style.color = 'red'