I imagine that you're showing profiles, 1 profile per row, horizontally.
While you'd like to display the images next to one another, with the profile information shown below each image.
If so, you may like to look over the following mark-up. The first table does what I imagine your code does, while the second uses tables nested inside table cells.
| 1 - *f4* | 1 - *f5* | 1 - *f6* | 1 - *f7* | 1 - *f8* |
| 2 - *f4* | 2 - *f5* | 2 - *f6* | 2 - *f7* | 2 - *f8* |
| 3 - *f4* | 3 - *f5* | 3 - *f6* | 3 - *f7* | 3 - *f8* |
| 1 - *f4* | 1 - *f5* | 1 - *f6* | 1 - *f7* | 1 - *f8* |
|
| 2 - *f4* | 2 - *f5* | 2 - *f6* | 2 - *f7* | 2 - *f8* |
|
| 3 - *f4* | 3 - *f5* | 3 - *f6* | 3 - *f7* | 3 - *f8* |
|
Code:
<!DOCTYPE>
<html>
<head>
<style>
table
{
border: solid 1px #505050;
}
</style>
</head>
<body>
<table class='horiz'>
<tr class='horiz'><td><img src='pic/*f3*'/></td><td>1 - *f4*</td><td>1 - *f5*</td><td>1 - *f6*</td><td>1 - *f7*</td><td>1 - *f8*</td></tr>
<tr><td><img src='pic/*f3*'/></td><td>2 - *f4*</td><td>2 - *f5*</td><td>2 - *f6*</td><td>2 - *f7*</td><td>2 - *f8*</td></tr>
<tr><td><img src='pic/*f3*'/></td><td>3 - *f4*</td><td>3 - *f5*</td><td>3 - *f6*</td><td>3 - *f7*</td><td>3 - *f8*</td></tr>
</table>
<hr>
<table class='vertical'>
<tr>
<td>
<table>
<tr><td><img src='pic/*f3*'/></img></td></tr>
<tr><td>1 - *f4*</td></tr>
<tr><td>1 - *f5*</td></tr>
<tr><td>1 - *f6*</td></tr>
<tr><td>1 - *f7*</td></tr>
<tr><td>1 - *f8*</td></tr>
</table>
</td>
<td>
<table>
<tr><td><img src='pic/*f3*'/></img></td></tr>
<tr><td>2 - *f4*</td></tr>
<tr><td>2 - *f5*</td></tr>
<tr><td>2 - *f6*</td></tr>
<tr><td>2 - *f7*</td></tr>
<tr><td>2 - *f8*</td></tr>
</table>
</td>
<td>
<table>
<tr><td><img src='pic/*f3*'/></img></td></tr>
<tr><td>3 - *f4*</td></tr>
<tr><td>3 - *f5*</td></tr>
<tr><td>3 - *f6*</td></tr>
<tr><td>3 - *f7*</td></tr>
<tr><td>3 - *f8*</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>