How can I hide everything after the ninth delimitation in the HTML element using CSS?

I have an HTML element with a list of synonyms. I just want the first 5 synonyms to be shown.

I mean, for the example below, how can I use CSS to hide everything, including the 5th comma for each element with the “synonyms” class?


<div class="synonyms"> talkative, garrulous, voluble, over-talkative, long-winded, wordy, verbose </div>

Leave a Reply

Your email address will not be published.