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. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *