To apply alternate row coloring in a table with CSS, you can use the ______ pseudo-class selector.
- :alt-row
- :even
- :first-child
- :odd
The :odd and :even pseudo-class selectors in CSS are used to style odd and even numbered elements respectively. When applied to table rows (like
), they can be used to style alternate rows. For instance, tr:odd would target every odd-numbered row in a table, enabling alternate row coloring.
Loading...
Related Quiz
-
What is the primary use of the
element in HTML? - The rel="______" attribute value is often used alongside target="_blank" to enhance security.
- How can a subject be added to the email link using mailto:?
- Which tag is used to define the body of the HTML document?
- How does the preload attribute in the audio or video tags affect the loading of multimedia content?