You are tasked with ensuring that all hyperlinks have no underlines but should be underlined when hovered over. How would you implement this using CSS?

  • a { text-decoration: none; } a:hover { text-decoration: underline; }
  • a { text-decoration: underline; }
  • a { text-decoration: underline; } a:hover { text-decoration: none; }
  • a:hover { text-decoration: underline; }
To ensure that hyperlinks have no underlines by default but are underlined when hovered over, you should use the CSS rule a { text-decoration: none; } to remove the underlines from all anchor elements and then use a:hover { text-decoration: underline; } to specify that underlines should appear when the link is hovered.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *