Computer Science, asked by rajapratabsing82, 1 year ago

what is the code to set the row with height 20% of the table​

Answers

Answered by rajanna4768
3

Answer:

You are in page:

1. The basics

2. Table headers

3. Table width and height

» 4. Row height & Column width

5. Merging cells

6. Cell spacing & Cell padding

Row height

To change the height of a row in a table you can use the height attribute for the <tr> tag.

So the code:

<table border="1">

<tr height="50"> <th>Name</th> <th>Age</th> </tr>

<tr> <td>Peter</td> <td>12</td> </tr>

<tr> <td>Megan</td> <td>14</td> </tr>

</table>

Will render:

Name Age

Peter 12

Megan 14

You can also set the height as a percentage of the total height of the table, like:

<table border="1" height="200">

<tr height="25%"> <th>Name</th> <th>Age</th> </tr>

<tr height="30"> <td>Peter</td> <td>12</td> </tr>

<tr> <td>Megan</td> <td>14</td> </tr>

</table>

Here you can also set the columns' width as a percentage of the total table's width. Like:

<table border="1" width="400">

<tr> <td width="25%">Windows</td> <td>uses Internet explorer</td> </tr>

<tr> <td>Mac OS</td> <td>uses Safari</td> </tr>

</table>

Similar questions