可以td在td内

时间:2021-07-21 20:24:48

It may be a nonsense question, and I know we have to follow standards as much as possible. But can <td> be a direct child of another <td>, like this:

这可能是一个无意义的问题,我知道我们必须尽可能地遵循标准。但是可以成为另一个的直接孩子,就像这样:

<td class="parent">
    <td class="child">
        <!-- Some info -->
    </td>
</td>

Or it's obligatory to create another <table> with a new <tr> before adding the <td>, which can become heavily populated with table tags and become clustered...

或者在添加之前必须使用新的创建另一个

,这可能会变得非常大量填充表标签并变成群集...

4 个解决方案

#1


18  

not directly but you could place table inside td

不是直接但你可以将表放在td内

<td class="parent">
   <table><tr>
    <td class="child">
        <!-- Some info -->
    </td>
   </tr></table>
</td>

#2


3  

No, <td> may not be a child of a <td>. A <td> may only be a child of a <tr>.

不,可能不是的孩子。 可能只是的孩子。

#3


0  

it's better to create a new table tag.

最好创建一个新的表标签。

The example you give is not standard and the behavior can be different from a browser to another one

您提供的示例不是标准示例,行为可能因浏览器而异

#4


0  

The problem with not following standards like putting a <td> tag inside a <dt>, is that you cannot guarantee that the result is the same for all browsers, or that the next update of any browser will for example not simply ignore wrongly-used tags.

不遵守标准的问题,例如在

中放置标签,是因为您不能保证所有浏览器的结果都相同,或者任何浏览器的下一次更新例如不会错误地忽略 - 用过的标签。

As a sidenote: we, as a developer comunity, have cried and shouted for Internet Explorer to finally start to take the standards seriously, so now let's not start making a mess ourselves!

作为旁注:作为一名开发者社区,我们为Internet Explorer哭泣并大声喊叫,最终开始认真对待这些标准,所以现在让我们不要自己弄得一团糟!

#1


18  

not directly but you could place table inside td

不是直接但你可以将表放在td内

<td class="parent">
   <table><tr>
    <td class="child">
        <!-- Some info -->
    </td>
   </tr></table>
</td>

#2


3  

No, <td> may not be a child of a <td>. A <td> may only be a child of a <tr>.

不,可能不是的孩子。 可能只是的孩子。

#3


0  

it's better to create a new table tag.

最好创建一个新的表标签。

The example you give is not standard and the behavior can be different from a browser to another one

您提供的示例不是标准示例,行为可能因浏览器而异

#4


0  

The problem with not following standards like putting a <td> tag inside a <dt>, is that you cannot guarantee that the result is the same for all browsers, or that the next update of any browser will for example not simply ignore wrongly-used tags.

不遵守标准的问题,例如在

中放置标签,是因为您不能保证所有浏览器的结果都相同,或者任何浏览器的下一次更新例如不会错误地忽略 - 用过的标签。

As a sidenote: we, as a developer comunity, have cried and shouted for Internet Explorer to finally start to take the standards seriously, so now let's not start making a mess ourselves!

作为旁注:作为一名开发者社区,我们为Internet Explorer哭泣并大声喊叫,最终开始认真对待这些标准,所以现在让我们不要自己弄得一团糟!