What is the fucntion of the <br/> tag in this table code ??? 🤔🤔🤔😕 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the fucntion of the <br/> tag in this table code ??? 🤔🤔🤔😕

<table border="2"> <tr> <td>Red</td> <td>Blue</td> <td>Green</td> </tr> <tr> <td><br /></td> <td colspan="2"><br /></td> </tr> </table>

11th Oct 2019, 11:09 PM
GRIITTYY
GRIITTYY - avatar
1 Answer
+ 3
The <br> in this example stops the table cells from collapsing. Remove the br tags to see what I mean. Between the opening and closing td tags, there is usually content for the cell. Sometimes as I'm designing tables without content yet, I'll throw " &nbsp; " into the td cell. This is html code for a space and stops the table cells collapsing .
11th Oct 2019, 11:27 PM
Xyenia 🦉
Xyenia 🦉 - avatar