Ever wonder how to make an entire table into a hyperlink? Do you want a link on your pages that works for WebTV, but not for PC browsers?
Here we will study those possibilities; but first let's begin with a traditional link within a table:
All hyperlink colors on this page are controlled by my body tag, unless noted otherwise.
<body bgcolor="#000000" text="#ffffff" link="#00cc00" vlink="#cc0000">
|
|
Notice the hyperlinks are green. Visited links are red and text is white. Click on one of the links and see the color change.
|
Click on "CODE" to view the source code for this table.
|
|
This table is exactly the same as the first, with one exception. Link one is not between </a> and the href tag, to show you how it looks if you make a mistake with your link. Notice that "CODE" is red in both tables if you have visited that link from either.
|
|
Let's make the table a little larger and see the difference between a text hyperlink and an entire cell as a hyperlink. The top row has a href attribute in both <td>'s. Click on "CODE" for the source code for that table. Note that cellpadding is defined as "0", zero.
Now, let's look at the same table with a little cellpadding added to the href cells. Note that in the table above, the yellow box actually overlaps space between the cells. In the table below, it stays well within the edge of each cell:
One more look at the same table. This is what a PC user would see. The href attributes in the cells are not supported by computer browsers; therefore, they "see" Link 1 and Link 2 as text.
Here are a few examples that have the href attribute in a table tag. Note the use of font color in the table. This over rides the body tag link and vlink attributes.
Table Art][
jawjahboy.com
|