+ 1

How to add lines to a table to show columns and rows

Below is a practice code for making a table. as you can see I am very new to this. can someone please help me. Ive added a border to my table because without it nothing gets selected in red or even have lines to separate rows and columns. im positive its the same as the example I was given however it wont work. please help...... <table border="1"> <tr> <th></th> <th><b>MUM</b></th> <th><b>DAD</b></th> <th><b>JANETTE</b></th> <th><b>CARLA</b></th> <th><b>GEM</b></th> </tr> <tr> <td><strong>Hoovering</strong></td> <td></td> <td></td> <td bgcolor="red"></td> <td></td> <td></td> </tr> <tr> <td><strong>Washing Up</strong></td> <td></td> <td></td> <td></td> <td bgcolor="red"></td> <td></td> </tr> <tr> <td><strong>Cooking</strong></td> <td></td> <td bgcolor="red"></td> <td></td> <td></td> <td></td> </tr> <tr> <td><strong>Dusting</strong></td> <td bgcolor="red"></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td><strong>Dog Walking</strong></td> <td></td> <td></td> <td></td> <td></td> <td bgcolor="red"></td> </tr> </table>

5th Jul 2019, 4:59 PM
Gem Sewell
Gem Sewell - avatar
6 Answers
5th Jul 2019, 5:13 PM
Russ
Russ - avatar
+ 2
According to W3Schools, if you don't give a table a border, it will not display one, so this behaviour is correct. Are you sure the blog didn't have any CSS properties active on the table?
6th Jul 2019, 8:36 AM
Russ
Russ - avatar
+ 2
I've just checked it and yes there are CSS properties active. I thought because I was just learning HTML for now nothing else would be added
6th Jul 2019, 9:11 AM
Gem Sewell
Gem Sewell - avatar
+ 1
Remove the border="1" and I lose all my lines. Yet on the example blog they have lines but no border set. https://code.sololearn.com/WLflef8eHq7O/?ref=app
5th Jul 2019, 5:27 PM
Gem Sewell
Gem Sewell - avatar
+ 1
Ah it might have. It was just the tutorial on the blog they gave me. Theirs had lines but mine didnt. I thought I was losing my mind. I'd checked the code numerous times and couldn't find any difference. Thank you so much for replying â˜șâ˜ș
6th Jul 2019, 9:09 AM
Gem Sewell
Gem Sewell - avatar
+ 1
Glad your confusion has been sorted! Good luck and keep going!
6th Jul 2019, 9:13 AM
Russ
Russ - avatar