I have a list, and each item is linked, is there a way I can alternate the background colors for each item?
If you want to do this purely in CSS then you'd have a class that you'd assign to each alternate list item. E.g.
If your list is dynamically generated, this task would be much easier.
If you don't want to have to manually update this content each time, you could use the jQuery library and apply a style alternately to each item in your list:
And your jQuery code:
$(document).ready(function(){
$('#myList li:nth-child(odd)').addClass('alternate');
});