Is there a way, for example, to make every question mark, exclamation mark or comma, etc. fit a specific style, without having to wrap each one in div or span for that style
div
span
One way is to dynamically add span with a specific class to all question marks. You can do this with a PHP function str_replace() like.
str_replace()
Here's an example of what I said about using regular expressions. You can also add additional punctuation to the expression:
string = $('p').text(); string = string.replace(/(['&.!,])/g,"<span>$1</span>"); $('p').html(string);
FIDDLE