Can we add div inside table above every ?

后端 未结 7 868
借酒劲吻你
借酒劲吻你 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 07:54

    "div" tag can not be used above "tr" tag. Instead you can use "tbody" tag to do your work. If you are planning to give id attribute to div tag and doing some processing, same purpose you can achieve through "tbody" tag. Div and Table are both block level elements. so they can not be nested. For further information visit this page

    For example:

    Data
    Data

    secondly, you can put "div" tag inside "td" tag.

    Further questions are always welcome.

提交回复
热议问题