Set Height for Table Rows

To set a specific height for the table rows using CSS, set CSS height property for the table rows tr, with the required value, like 100px, 1em, etc.

The CSS code to set height for table rows is showing in the following.

tr {
  height: 60px;
}

Examples

ADVERTISEMENT

1. Set 60px height for table rows

In the following example, we take a table with two columns, three rows, and set the rows’ height to 60px;

index.html

You may change the height value, runt he program, and observe the output.

Conclusion

In this CSS Tutorial, we learned how to use CSS height property to set a specific height for the table rows, with examples.