highlight words with CSS | SoloLearn: Learn to code for FREE!

0

highlight words with CSS

Can I somehow manipulate a specific word using CSS? For example, I have the word Granger in the text, and I want them all to be highlighted in some color (I'll figure it out myself). Can I somehow highlight these words without the <span>?

7/12/2020 10:12:30 AM

Granger

4 Answers

New Answer

+2

You don't have to use/write tags directly in your HTML. You can use JS and do DOM manipulation to add tags. [This is my try] https://code.sololearn.com/Wdt3bniQl6De/?ref=app

+3

Using mark tag in html or In css using font-weight.

+1

Såñtösh Màràvi(Challenge Me On Python), I know about font-weight, and about tags, I just wanted to know if I could somehow highlight a word without tags. Thanks)

0

🔫 Rick Grimes, JS is good, but I'm new in web, so I'm still a long way off 🗿😂, thanks!