![]()
|
Set the table, HTML will be servedby Kurt KellerHTML is not a tool for designers. You never know how all the different browsers will render your 'art-work'. While one browser might use bold typeface for emphasis, another may well use italics. And if you have to create a spec sheet or something alike in HTML you're in trouble too. Of course, you could just make a plain ASCII file and include it in <PRE> tags. For surfers who have their browser window set to full screen with a small fontsize on a high resolution monitor, this might all look fine; but the poor souls who have to scroll right to left to right to left to right to left... just because their settings do not match yours? They're hardly going to buy your product if you give them such a hard time getting the information. Luckily most browsers these days do support tables. (It's a pity my trustworthy old version of Lynx does not.) With tables and a few tricks, you can do quite some magic.
Everything what follows now, is used within the <TABLE> and </TABLE> tags.
Everything following is enclosed in <TR> and </TR> tags, whereas you can use several <TD></TD> or <TH></TH> pairs per <TR></TR> pair.
Confused? No wonder. Up to now everything has been dry theory and the whole topic is not too easy because the tags are all nested in each other. If you read this online or have a browser right near you, I'd recommend to now quickly take a look at http://www.pinboard.com/html/aj710_1.html, which is a resume, making extensive use of tables. To make it easier to understand how tables have been set up, the border and individual cells are visible. At http://www.pinboard.com/html/aj710_2.html the same resume can be found as it probably would be published; without borders. This table can be viewed at various window sizes. It will look ok independent of whether you have your browser set to use the whole screen or only half of it. A very useful 'layout' trick has been used in this CV. Titles like Name, Address, Phone, should be separated by a small space from the actual data. How to do this? CELLPADDING would cause ugly empty space to the left and right of the whole table when viewed without borders. CELLSPACING, on the other hand, causes the rows to be separated too, so the whole multiple-row table does not look fine. The chosen solution was to add empty columns where necessary. Simply adding <TD> </TD> does not work, since multiple spaces are not displayed as multiple spaces. So instead of normal space characters, NonBreakingSPace has been used:
Tables are a very powerful tool and there are lots of possibilities and tricks. For example it is also possible to use tables within tables etc. It should be no problem to fill a whole booklet with information on using tables. This here is only a short introduction and not even all the options for the tags have been mentioned. Take it as a foundation on which you can build. Try and practice (on your own harddisk or even better, use PINBOARD's HomePage Hosting Service, available at a very reasonable rate). For the ones of you who do not yet have a browser, a small, very simple example (would be displayed slightly different than drawn here when actually viewed with a browser):
--------------------------------------------
| Name | age | points |
|---------------|-------------|--------------|
| Claus | 12 | 49 |
|---------------|-------------|--------------|
| Mario | 13 | 53 |
|---------------|-------------|--------------|
| Sven | 12 | 47 |
--------------------------------------------
I now move on to a different table; it's already late, but I still didn't have dinner. See ya later! © Algorithmica Japonica Copyright Notice: Copyright of material rests with the individual author. Articles may be reprinted by other user groups if the author and original publication are credited. Any other reproduction or use of material herein is prohibited without prior written permission from TPC. The mention of names of products without indication of Trademark or Registered Trademark status in no way implies that these products are not so protected by law.Algorithmica Japonica January, 1997 The Newsletter of the Tokyo PC Users Group Submissions : Editor Tokyo PC Users Group, Post Office Box 103, Shibuya-Ku, Tokyo 150-8691, JAPAN |
||||||||||||||||||||||||||||||