0

What changes should be made in the code to output a tabl

https://code.sololearn.com/WA3ZToPCPTlA/?ref=app

11th Oct 2021, 2:48 AM
bernard
bernard - avatar
6 Réponses
+ 1
You can use these simple ways:- 1. BORDER COLOUR To set the colour of table's border Example:- <Table border=3 border colour="blue"> 2. BORDER It specifies the width of the border of a table. Examples:- <Table border="3"> 3. BGCOLOR To set the background colour of different parts of a table. Examples:- <tr bgcolor ="red"> (Changes backgroundcolor of entire table) <Td bgcolor="yellow"> (Changes backgroundcolor colour of cell) <th bgcolor="blue"> (Changes backgroundcolor of a heading cell) 4. ALIGN To specify the alignment of table Example:- <Table align="centre"> (It will make the words in the centre of their cell). * You can also use left and right align.
11th Oct 2021, 11:32 AM
𝓐𝓷𝓼𝓱𝓲𝓴𝓪 (Anshika)
𝓐𝓷𝓼𝓱𝓲𝓴𝓪 (Anshika) - avatar
+ 1
You could add a border in your css to see your table. Like this. table, td { border-style: solid; border-width: 4px; } And add some content inside your td tags. 😉
11th Oct 2021, 2:58 AM
Stefanoo
Stefanoo - avatar
+ 1
Sure you already have a table but with no content and no borders so you didn't can't see it.
11th Oct 2021, 3:00 AM
Stefanoo
Stefanoo - avatar
+ 1
Continued.... 5. Height and width You can change the height and width of the table Example:- <table height="300" width="400"> It is also possible to control the dimensions of individual table cells or rows Example:- < td height="80"> <tr width="50%"> Hope it works............
11th Oct 2021, 11:36 AM
𝓐𝓷𝓼𝓱𝓲𝓴𝓪 (Anshika)
𝓐𝓷𝓼𝓱𝓲𝓴𝓪 (Anshika) - avatar
0
Can't I create a table with html only I haven't learnt CSS
11th Oct 2021, 2:59 AM
bernard
bernard - avatar
0
Oh ok
11th Oct 2021, 3:01 AM
bernard
bernard - avatar