Which CSS pseudo-class would allow you to target only the last list item in an unordered list?
- :last-child
- :last-item
- :nth-last-child
- :only-child
To target the last list item in an unordered list, you should use the :last-child pseudo-class. This will select the last child element of its parent, which in this case is the last list item in the unordered list.
Loading...
Related Quiz
- Which SASS/SCSS feature allows you to pass values when including a mixin?
- Which CSS property is used to specify the number of times an animation should run?
- When you want flex items to stack vertically, you set flex-direction to ________.
- What is the result when an element does not have a specific style defined but its parent does?
- In terms of specificity, which type of selector has the highest priority?