Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

How do you resize table row height in HTML?

I have been through the HTML tables course. But it didn't show me some of the basics such as how to set the row heights, column widths, etc. And there don't seem to be any other courses in the library that do.

Do you know how to do this? Thanks. B

2 Answers

Hugo Paz
Hugo Paz
15,622 Points

Hi Ben,

Nowadays styling a table should be done through css due to most table attributes being deprecated.

You can get a lot of information on how to style a table here

Kris Phelps
Kris Phelps
7,609 Points

Hey Ben,

As Hugo said, tables should be styled through your CSS. Examples:

/* Changing row height */
tr {
  height: 20px;
}

/* Changing cell width. Don't forget th! */
td, th {
  width: 40px;
}