Tagged: class, CSS, formatting
Hi,
I would like to know how to format a single line of text in a text using a class. I’m able to format using an entire element but I want to focus on a specific text.
Here is the visual text: The fox is a lazy jumper.
I want to change a specific word in color and size. Here is what I have in the code now
The fox is a <p class=”word”;>lazy</p> jumper.
In my custom CSS, I have the following class:
.word {
color: red;
font-size: 20px;
}
I’ve tried this and am unable to get this to work. Please advise what I could be doing wrong.
sl
Maybe try adding !important
.word {
color: red;
font-size: 20px !important;
}
Thanks. I figured out what was the issue. Thanks rlogan2334.