+ 1

Table break

Why there is break code between table data? <table><tr> <td><br/></td> </tr> </table>What is the meaning of having it in there without it also it looks like same

30th Mar 2018, 6:00 AM
Pawan
Pawan - avatar
1 Réponse
+ 1
The reason of putting a <br> in a <td> is of the same kind as putting '&nbsp;' html entities (non-breakable white space): not having an empty table cell, which may be displayed without borders by some browsers... http://jkorpela.fi/HTML/emptycells.html In fact, <br> act as '&nbsp;' by defining implictly a min-height value equal to the line-height applied to the cell : the only direct advantage is that <br> doesn't define also a min-width implicit value ( '&nbsp;' as a width, while <br> don't have). To avoid the min-height implicit value, with a <br> as content, you could define to these fake-empty cells an explicit line-height of zero, while you could define a zero font-size to get the same behaviour with a fake-empty cell with '&nbsp;' as content ;)
30th Mar 2018, 11:08 AM
visph
visph - avatar