How to properly style HTML tables
Some folks would argue that you should never use tables. And, for the most part, I agree.
I believe that HTML markup should be meaningful, and therefore, you shouldn't use tags for something they weren't intended for (such as laying out a web page.) However, tables were put into the HTML standard for a reason, displaying tabular data.
For instance, if we have a database of employees and we want to print a report that contains our top performers, their salary, and contact information a table would be the perfect candidate.
Here's a fictitious example of what a web page might return from a database of employees.
This, in my humble opionion is perfectly acceptable. We have tabular data that belongs in an HTML table. But, what do we do from here? The table returned is drab and needs some styling to look as sharp as the rest of the site. Let's add some style.
Better! This turned our drab table from the 90's into something that looks clean and professional.
Remember, you should only use tables for displaying tabular data. If you want a good way to lay out the graphics on your web page, then check out this tutorial to help get you started.
You can view the entire web page here.