I’m reading a great book at the moment by Jon Duckett called HTML @ CSS -Design and Build Websites. He briefly mentions the <span> element on page 188 as a means of targeting a section of text when there is no other suitable element.
My question is this. If for some reason I wanted to target a particular word (such as the word “and”) throughout the whole page, how could I go about doing this? If for some reason I wanted to change the general colour or appearance how could I go about doing this. I’m just wondering if the span element could somehow be used to create a class that could be applied to each occurrence of a specific word. Just wondering if you could provide an example covering the code in HTML/CSS.
I’ve also reviewed your lessons Jamie including the video on CSS. I notice that when you create a new class you use that within a div element. Do you use a div to keep in line with the semantics of coding only as I’m pretty sure the same could be achieved using the p tag (although I am aware that p tags cannot be nested).