Alternating Row Color in HTML Tables

HTML tables are nice for presenting data. However, with wide tables, you might want to alternate the line colors (e.g. blue and white) for improving readability. You may code this by hand, maybe assigning different CSS classes to the
Tags. Some wiki enginges do this automatically for you (e.g. TWiki). Recently I've found some nice howtos for automating table striping:

Lorenzo E. Danielsson shows how table striping with PHP works.
David F. Miller explains how to use JavaScript and CSS for alternating row colors in an HTML table.
And David Storey demonstrates how CSS3 supports alternating row colors.

Image stolen from David F. Miller's blog post

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: