1 reply [Last post]
demiurgen
Offline
Enthusiast
Last seen: 2 years 21 weeks ago
Timezone: GMT+2
Joined: 2005-04-13
Posts: 55
Points: 11

I want to make a layout that looks like the contact cards in Apple's Address Book app on the Mac.

Is it ok to use a good old table for this?
Can I also include the name and the links in the table or should they be left out of the table like I have in the example below?

<h2>Aaaa Aaaaaaa</h2>
<ul>
	<li><a href="#">Message</a></li>
	<li><a href="#">Call</a></li>
	<li><a href="#">Email</a></li>
</ul>
<table>
	<tr>
		<td>mobile</td>
		<td>987 65 432</td>
	</tr>
	<tr>
		<td>email</td>
		<td>mail@mail.com</td>
	</tr>
	<tr>
		<td>address</td>
		<td>Street 7<br>12345 City<br>Country</td>
	</tr>
</table>

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 day 11 hours ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9745
Points: 3824

Table or dl

A table would be fine. However, the way you've structured your example is incorrect. You appear to be basing your structure on how you want the entry to appear.

A table is a structure for tabular data. Each row in a table belongs to the same record, with each cell being a field entry for that record. Every cell in a column belongs to the same field, e.g. email address.

Better, I think, would be the the dl element. You will have more freedom in its structure and freedom to vary its appearance.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.