Set Height for Table Headings

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

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

th {
  height: 60px;
}

Examples

ADVERTISEMENT

1. Set 60px height for table headings

In the following example, we take a table with two columns, and three rows; and set the headings’ 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 headings, with examples.