-1

In my website I have a particular word which appears on many of my pages and want every single one to be stylised to be bold. Is there a way to do this via CSS or will I have to add code to every single page?

1 Answers1

2

I don't think there is a way to do this with CSS, without adding markup to every occurrence of the word.

You can use a combination of CSS/JQuery to do it like this:

CSS:

.word {
   font-weight: bold;
 }

JS:

$('html').text().replace(/word/g,"<span class='word'>$1</span>");

Adam
  • 2,214
  • 1
  • 15
  • 26