How to change the HTML Color Coding?
Moderator: General Moderators
How to change the HTML Color Coding?
I am setting up a webpage, and have set the color for the links, in rest state and hover state. However, how can I add a portion of code so that a section of the text will have different color in rest state and hover state?
Re: How to change the HTML Color Coding?
Add a class to the text and set a hover rule on the class.
Code: Select all
p.some-class:hover {
color: green;
}Code: Select all
<p class="some-class">Lorem ipsum dolor sit amet...</p>