Yep, you can use separate HTML elements, the key bit is to keep the closing and opening tags directly adjacent with no whitespace or newlines, example https://jsfiddle.net/z65qwuvp/1/
see your comment siblings, there are some clever font tricks to achieve that too