在 table 下对齐文本段落(link 字符串)

Aligning a text paragraph (link string) under a table

我有一个 table 和一行图片链接。我无法在 table 下获取这些链接。无论我做什么,它都停留在它上面。

我的代码可能看起来很笨重或者是错误的。

<table style="margin-top:10px; margin-left:165px" border="1" cellpadding="15" cellspacing="5">
<tbody><tr>
<tr style="background-color:#FF0000;color:#ffffff;">
<td><div><iframe src="https://www.youtube.com/embed/2NaNp7nmYMg?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
<td><div><iframe src="https://www.youtube.com/embed/_z5rqY8tAYQ?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
<td><div><iframe src="https://www.youtube.com/embed/dheMabIam7c?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
</tr>

<p style="padding-left: 750px; padding-top: 50px"
<a href="https://twitter.com/ShadowKiller158" target="_blank"></a>
<a href="https://youtube.com/user/shadowman158" target="_blank"><img src="youtube.png" alt="YouTube" width="75" border="0" height="75"></a>
<a href="https://twitter.com/ShadowKiller158" target="_blank"><img src="twitter.png" alt="Twitter" width="75" border="0" height="75"></a>
<a href="https://www.facebook.com/alexander.schewior" target="_blank"><img src="facebook.png" alt="Facebook" width="75" border="0" height="75"></a>
<a href="http://steamcommunity.com/id/ShadowManTM/" target="_blank"><img src="steam.png" alt="Steam" width="75" border="0" height="75"></a>
<a href="https://www.instagram.com/shadowmantm/" target="_blank"><img src="instagram.png" alt="Instagram" width="75" border="0" height="75"></a>
</p>

您还没有关闭您的 table 或 tbody 标签。您也没有关闭您的起始 P 标签。

所以你的代码应该是:

<table style="margin-top:10px; margin-left:165px" border="1" cellpadding="15" cellspacing="5">
<tbody>
<tr style="background-color:#FF0000;color:#ffffff;">
<td><div><iframe src="https://www.youtube.com/embed/2NaNp7nmYMg?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
<td><div><iframe src="https://www.youtube.com/embed/_z5rqY8tAYQ?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
<td><div><iframe src="https://www.youtube.com/embed/dheMabIam7c?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
</tr>
</tbody>
</table>

<p style="padding-left: 750px; padding-top: 50px">
<a href="https://twitter.com/ShadowKiller158" target="_blank"></a>
<a href="https://youtube.com/user/shadowman158" target="_blank"><img src="youtube.png" alt="YouTube" width="75" border="0" height="75"></a>
<a href="https://twitter.com/ShadowKiller158" target="_blank"><img src="twitter.png" alt="Twitter" width="75" border="0" height="75"></a>
<a href="https://www.facebook.com/alexander.schewior" target="_blank"><img src="facebook.png" alt="Facebook" width="75" border="0" height="75"></a>
<a href="http://steamcommunity.com/id/ShadowManTM/" target="_blank"><img src="steam.png" alt="Steam" width="75" border="0" height="75"></a>
<a href="https://www.instagram.com/shadowmantm/" target="_blank"><img src="instagram.png" alt="Instagram" width="75" border="0" height="75"></a>
</p>

这里有一个关于打开和关闭 HTML 标签的实用教程: http://www.easyhtmlcode.com/lesson1.html

抱歉,我刚刚忘记关闭 tbody 和 table 标签。感谢皮特向我指出这一点!

您需要小心打开和关闭 HTML 标签,因为某些浏览器会自动处理未关闭的标签,不会让您知道不匹配。

每个配对标签都应该在正确的位置关闭!否则会给你带来麻烦!

<table style="margin-top:10px; margin-left:165px" border="1" cellpadding="15" cellspacing="5">
<tbody><tr>
<tr style="background-color:#FF0000;color:#ffffff;">
<td><div><iframe src="https://www.youtube.com/embed/2NaNp7nmYMg?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
<td><div><iframe src="https://www.youtube.com/embed/_z5rqY8tAYQ?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
<td><div><iframe src="https://www.youtube.com/embed/dheMabIam7c?ecver=2" width="481" height="274" frameborder="0" allowfullscreen></iframe></div> </td>
</tr>
</tbody>
</table>

<p style="padding-left: 750px; padding-top: 50px">
<a href="https://twitter.com/ShadowKiller158" target="_blank"></a>
<a href="https://youtube.com/user/shadowman158" target="_blank"><img src="youtube.png" alt="YouTube" width="75" border="0" height="75"></a>
<a href="https://twitter.com/ShadowKiller158" target="_blank"><img src="twitter.png" alt="Twitter" width="75" border="0" height="75"></a>
<a href="https://www.facebook.com/alexander.schewior" target="_blank"><img src="facebook.png" alt="Facebook" width="75" border="0" height="75"></a>
<a href="http://steamcommunity.com/id/ShadowManTM/" target="_blank"><img src="steam.png" alt="Steam" width="75" border="0" height="75"></a>
<a href="https://www.instagram.com/shadowmantm/" target="_blank"><img src="instagram.png" alt="Instagram" width="75" border="0" height="75"></a>
</p>

祝你好运,享受学习HTML