How can you underline text using CSS?
- font-decoration: underline;
- font-style: underline;
- text-decoration: underline;
- text-style: underline;
To underline text in CSS, you should use the text-decoration property and set it to "underline." This CSS rule adds a line beneath the text.
Loading...
Related Quiz
- Which CSS pseudo-class would allow you to target only the last list item in an unordered list?
- You're developing a website where certain styles should only be applied to screens wider than 768px. How would you set this condition using media queries?
- You need to create a layout where a sidebar stays to the left and the main content takes up the remaining width. Which combination of float and width properties would achieve this?
- Which CSS property is used to create animations by gradually changing from one set of CSS styles to another?
- In a grid layout, how would you make an element occupy the space of two columns starting from the second column?