+ 2

Can I define height and width of table in html

7th Oct 2019, 12:34 PM
Himanshu Rai
Himanshu Rai - avatar
2 ответов
+ 2
You can, but not recomended because HTML5 does not support it (you have to use CSS for those attributes): <table width="400" height=“100”> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </table> Play with the numbers of width and height to see how they aftectbthe table.
7th Oct 2019, 12:57 PM
Marcos Rodrigo Sousa
Marcos Rodrigo Sousa - avatar
+ 2
Correct, in HTML, these height and width attributes are working. But if we enter value in percentage, the effect of it is only upto 100%, but if we give value in px, we can heighten our table to even any range!!!😎
8th Oct 2019, 3:31 AM
Himanshu Rai
Himanshu Rai - avatar