Can we add div inside table above every ?

后端 未结 7 764
借酒劲吻你
借酒劲吻你 2020-11-30 07:14

Hi am trying to add a div above every but when i look at the html console the div are showing outside the table. below is the html code.



        
相关标签:
7条回答
  • 2020-11-30 08:02

    If we follow the w3 org table reference ,and follow the Permitted Contents section, we can see that the table tags takes tbody(optional) and tr as the only permitted contents.

    So i reckon it is safe to say we cannot add a div tag which is a flow content as a direct child of the table which i understand is what you meant when you had said above a tr.

    Having said that , as we follow the above link , you will find that it is safe to use divs inside the td element as seen here

    0 讨论(0)
提交回复
热议问题