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.
Loading...
Related Quiz
- The default value of animation-timing-function is ______.
- In CSS, if you want an element to inherit a property's value from its parent element, you would use the value ________.
- If you have a CSS rule with !important and another rule with higher specificity targeting the same element, which one will take precedence?
- What is the default value of the box-sizing property in CSS?
- In SCSS, the @import directive allows you to ________.