Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking tables 1

Status
Not open for further replies.

rudenborg

Programmer
May 18, 2004
19
US
I have sort of a general question. Is it against HTML standards to link a table?

example:

<a href="page.php">
<table>
<tr>
<td>
table text
</td>
</tr>
</table
</a>

Linking a table will work just fine in some browsers, but I've had problems with IE 6 on windows 98, and Firefox on mac os 10.2. IE just wouldn't work at all, Firefox was very sporadic, working sometimes and not others, with no detectable pattern. I was using Javascript in the link but it didn't seem to change when I took the Javascript out.

I'm creating a composite image from many images and using a table to hold them together. I would be nice to just link the table rather than linking all 9 images.

Thanks in advance for your help!

Jonathan
 
Here is your answer:
Non-validated

No, that is not allowed, since <a> is an inline element and <table> is a block level element. maybe you could create a table out of spans by making them display table-like if you need it desperatelly.
 
Thanks so much!

I've done a lot with HTML, but I guess I never thought about the fact that an inline element can't enclose a block level element. But now that you said that it makes total sense. I feel pretty stupid now.

Gosh, I'm dreading running a validator on my website!

Thanks again!

Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top