You'll need to, because you'll be responsible for it.
Something I've learned from years on these forums is that copy-and-paste code never works.
The first example on the page maxxd links shows how JavaScript can add style to an HTML element. You have an HTML element there called newElement
and adding styling to that is what you're asking for.
Unless by "text part" you mean a part of the text you're adding. If that's true then you'll need to use more than just a p
element. You will also need a span
element around the part you want to colour, and then add the style to that.