To style a section of text inside of another element, use the
span element to wrap the text and add a
id attribute to it, like this:
<p>The span element is used to <span class="my-class">style text inside</span> of another element.</p>
First, recreate the HTML code in the embedded CodePen demo.
Then recreate the CSS code in the embedded CodePen demo.
span element on MDN