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


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


4 Answers

New Answer


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


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


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)


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