I want to highlight a part of a text as shown in the image below, I have tried using background-color
which didn't give me very useful results. Also, this same styling is used in different places so can't use SVG, as it will lead to multiple SVGs. The text is supposed to be always highlighted, I'm not talking about modifying text when its selected
This is the code I have already tried (this code highlights the text but not in the way I want it). The problem is how to highlight the text in the shape I want it to be ?
span {
background-color: yellow;
}
<div>
some text <span>highlighted</span>
</div>