O'Reilly logo

Head First HTML with CSS & XHTML by Eric Freeman, Elisabeth Robson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Tables and More Lists: Getting Tabular

image with no caption

If it walks like a table and talks like a table... There comes a time in life when we have to deal with the dreaded tabular data. Whether you need to create a page representing your company’s inventory over the last year or a catalog of your Beanie Babies collection (don’t worry, we won’t tell), you know you need to do it in XHTML; but how? Well, have we got a deal for you: order now and in a single chapter we’ll reveal the secrets that will allow you to put your very own data right inside XHTML tables. But there’s more: with every order we’ll throw in our exclusive guide to styling XHTML tables. And, if you act now, as a special bonus, we’ll throw in our guide to styling XHTML lists. Don’t hesitate, call now!

image with no caption
image with no caption

How do you make tables with XHTML?

Tony’s right; you really haven’t seen a good way of using XHTML to represent his table, at least not yet. While you might think there’s a way to use CSS and <div>s to create tables, XHTML has a <table> element to take care of all your tabular needs. Before we dive into the <table> element, let’s first get an idea of what goes into a table:

Brain Power

If they put you in charge of XHTML, how would you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required