TLDR; Can I use jQuerty or CSS to make it so every time a certain word/phrase occurs in my < p > elements it is emphasized?
I’m trying to do the tribute page, and I’m writing about an author. I’m trying to make it so every time I mention one of his works the title is italicized without using < em > every time. Is there a way I can use jQuery or CSS to set it so every occurrence of the title gets italicized? I was thinking use:
$(“p”).html("< em >Title< /em >");
But this just gets rid of all the text inside the < p > element. For example if I had
“< p > Title is a book by author < /p >”
And used this jQuery function all that would be displayed is “Title” in italics, the additional words would be missing.