Maddog's HTML for Real People Chapter 9, Lesson 1


[INDEX] Ch 9, L 1 - Tables and Compatibility Issues

If you are already familiar with browser-compatibility issues concerning the use of HTML tables, you can skip this lesson.

The simplest form of tabular data might be presented in text form, using the HTML '<PRE> </PRE>' tag pair to assure uniform spacing. Such an text-based table might appear like this:

                               Class Attendance
                               ----------------
Class                    Jan-Mar    Apr-Jun    Jul-Sep    Oct-Dec
-----                    -------    -------    -------    -------
Intro to Internet           14         26         29         28
Building Your Web Page	    26         25         28         30
Perl / CGI                  12         10         14         12

You can, of course, elect to do this, and we'll discuss some reasons why you would, but it's generally tedious work, and that's one thing real people (like us) would like to avoid. If you do decide to build tables using text, avoid using "tabs", because the receiving browser may consider a "tab" to be anything from 4 to 10 spaces, and you have no idea what that definition might be.

There are some significant compatitbility issues to consider before using tables in your web page. The recent versions of the two most popular browsers, Netscape and Internet Explorer, support tables quite nicely. But just because they're the most popular, doesn't mean that they own the browser market. I'm only guessing, but I would be surprised if these two browsers comprise much more than half of the browsers currently being used on the Internet. The remaining browsers include those provided by ISPs like local providers, and the big-gun providers like AOL and others. Often, these browsers lag a year or so behind the more advanced browsers, and it is no secret that their performance with HTML tables sometimes suffers.

If you do use tables, and someone with an older or less-robust browser opens your page, the results can be quite unpredictable. Typically, when a receiving browser encounters a tag it doesn't support, it ignores it, and continues printing whatever text it encounters as if it were plain HTML text. If the above table were implemented in HTML tables (instead of text), and a non-supporting receiving browser were to encounter the table's HTML tags, it might end up displaying them like this:

Class Attendance ---------------- Class Jan-Mar Apr-Jun Jul-Sep Oct-Dec ----- ------- ------- ------- ------- Intro to Internet 14 26 29 28 Building Your Web Page 26 25 28 30 Perl / CGI 12 10 14 12

Not too readable, huh? Some browsers, which supposedly implement tables, do such a poor job that the tables run off the side of the page, or get jumbled up, or get truncated for no obvious reason at all. Occasionally, one of these "not-so-good" browsers will actually balk, cutting the web page off at the knees, so to speak.

Should you be worried about any of this? Hard to say, really. Given a year or two, the bulk of the market will have caught up with HTML tables, and these problems will be fairly insignificant (there will always be a small portion of the Internet population using outdated or buggy browsers). In the meantime, consider what audience you want to target with your web page. If you want to aim your web page at computer-professionals or affluent computer-users, chances are pretty good that they will be using the latest advanced browsers, and you can be fairly confident that your web page with tables will look like you expect it to. If, however, you think it's important to reach those using older computers and software, or those using "canned" ISP browsers, or school children, it might be best to avoid using tables unless you're willing to lose a significant chunk of your potential audience. [Believe me, you can build a very pleasing and presentable web page, even without tables or other "advanced features" like forms, frames, and animations]

An alternative solution, and one used by many larger web sites, is to provide a fancy web page using complex implementations of tables, and a clickable-text link near the top of the page, called "Text Only" or "If Your Browser Doesn't Support Tables". That special link takes the user to a set of web pages which pretty much contains the same information, but in less fancified form, i.e., not using tables or other "advanced features".

Another compatibility issue related to tables is screen size. If you build tables that are as wide as your super-whiz-bang ultra-SVGA monitor running in 1024 x 1280 screen resolution, those tables are going to look pretty lame on a receiving browser running in the smaller 640 x 480 screen resolution. Remember, many casual computer users (not knowing they can use higher resolutions) leave their MS Windows broswer in 640 x 480 mode, which is the MS Windows default. In addition, many lower resolution monitors are still in use, again running 640 x 480 (mine among them).

I wish I had a dollar for every time I've seen fancy web pages with a sidebar that takes up half the screen, and partitions that (I'm sure) don't look anything like the author intended them to. Use your own good judgment, but I recommend that you consider constructing tables so that they look good on a 640 x 480 screen. Most browsers can be dynamically "resized" (by dragging the corner inward) to simulate a 640 x 480 screen on a higher-resolution monitor. Having done so, you can review your newly authored web page, and consider how it looks when viewed on the smaller screen. In most cases, if it looks good in a 640 x 480 window, it will look just as good on a larger screen (albeit a bit smaller).

Finally, the last compatibility issue I'll mention is printing. For some reason, many browsers seem to have a problem printing tables correctly (to the hardcopy printer). Just be aware of that possibility. If it's important to you that whoever is on the receiving end be able to generate a hardcopy of your tabular data, you may want to consider building the tables manually, using plain text and the '<PRE>' tags.

Once again, don't let any of this scare you away from building your own web page. Even if you elect to use tables, or use them at higher resolution, you'll have plenty of folks with compatible browsers and equipment. Besides, if you let the details scare you away, nobody will be seeing your web page, and that would deprive the world of your own unique creative statement. And that would be a shame, wouldn't it? And I mean that sincerely!


-PREVIOUS- -CHAPTER- -INDEX- -NEXT-

Overseer: Monty Northrup ... maddog@io.com ... leave e-mail ...
...to maddog 'n' miracles homepage...