Lacer Lacer - 1 month ago 6
CSS Question

Text that shows an underline on hover

Can you underline a text on hover using css? (Like the behavior of a link but not an actual link.)


  1. you have the following text Hello work

  2. when you hover your mouse over the text it underlines it using css



(the text is not a link)

Answer
<span class="txt">Some Text</span>

.txt:hover {
    text-decoration: underline;
}
Comments