How can you target an ordered list and its list items in a single CSS selector?
- ol + li { ... }
- ol / li { ... }
- ol li { ... }
- ol, li { ... }
To target both an ordered list (ol) and its list items (li) in a single CSS selector, you should use "ol li" without any comma or additional characters. This selector will apply styles to all li elements within an ol element.
Loading...
Related Quiz
- You're designing a photo gallery using a grid layout. Each row should display three images. The middle image in each row should be twice as large as the images on its sides. How would you achieve this?
- If you're experiencing a "flash" of unstyled text on your webpage, it might be related to which aspect of font loading?
- How can you target an input element in CSS based on its validation state?
- Which property is used to span multiple rows or columns in a grid layout?
- The "line-height" property can be set using units like px, em, and ________.