A Wired.com user account lets you create, edit and comment on Webmonkey articles. You will also be able to contribute to the Wired How-To Wiki and comment on news stories at Wired.com.
It's fast and free.
processing...Retrieve Sign In
Please enter your e-mail address or username below. Your username and password will be sent to the e-mail address you provided us.
processing...Welcome to Webmonkey
- edit articles
- add to the code library
- design and write a tutorial
- comment on any Webmonkey article
Sign In Information Sent
Create Simple HTML Tables
/skill level/
/viewed/
I love tables. I know, I know. I'm a geek. But I really do.
I remember when I first discovered tables, back in the days of Netscape 1.1. I stayed up all night and had a transcendental experience around 4 a.m. Finally, I could control where things fell on a page!
Well ... kinda. Actually, the beauty of tables is that they're flexible. You can make them spread out, and take up the whole page (no matter how wide the user makes it). Or you can make them rigid, and force the page into a certain shape. The choice is yours. You're in control.
But today we're starting with the basics.
This tutorial, originally submitted by Webmonkey writer Derek Powazek, is a wiki. Portions of it may be outdated, but it is well-loved, so it has been preserved here for historical purposes.
Contents |
Cans and Can'ts
The first step to understanding tables is knowing what shapes you can make with them. Start with a grid:
That's doable in a table. You can also begin to remove lines:
The grids above are also doable. But this below is not:
Basically, if you can draw it in a grid, and it's not shaped like an L, you can put it in a table. And if you understand what you can and can't do right from the beginning, you'll save yourself lots of hassle in the long run.
The Basics
There are three basic units in any table:the table, the table row, and the table cell. The tags for these are:
Table:/related_articles/
Special Offer For Webmonkey Users
WIRED magazine:
The first word on how technology is changing our world.
