Beyond Ordinary Tables
On the face of it, tables are pretty
ordinary: just a way for academics and other like-minded data
crunchers to format items into columns and rows for easy comparison.
Scratch below the surface, though, and you will see that tables are
really extraordinary. Besides <pre>
, the
<table>
tag and related attributes provide
the only way for you to easily control the
layout of your document. The content inside a
<pre>
tag, of course, is very limited.
Tables, on the other hand, may contain nearly anything allowed in
normal body content, including multimedia and forms. And the table
structure lets you explicitly control where those elements appear in
the user’s browser window. With the right
combinations of attributes, tables provide a way for you to create
multicolumn text and side and straddle heads. They also enable you to
make your forms easier to read, understand, and fill out.
That’s just for starters.
We don’t know that we can recommend getting too caught up with page layout — tables or beyond. Remember, it ain’t about looks, it’s about content. But ...
It’s easy to argue that tables of information benefit from some controlled layout and that forms follow a close second. Tables provide the only way to create predictable, browser-independent layouts for your web pages. Used in moderation and filled with quality content, tables are a tool that every author should be able to wield.
And now that we’ve whetted your appetite for page layout with tables, don’t despair ...
Get HTML & XHTML: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.