Which DOM elements can be child of tr?

后端 未结 4 1586
遥遥无期
遥遥无期 2020-11-30 14:57

I have problem becouse I want to surround some of td inside tr so I need to know.

Which DOM elements can be child of tr? (I know div<

4条回答
  •  佛祖请我去吃肉
    2020-11-30 15:41

    W3C specify this stuff. For tr, you can find it here. Basically, only th and td elements can be direct contents of tr.

    If you want other stuff inside your table, it has to go inside the td or th elements. For example, td can contain flow elements, including div.

提交回复
热议问题