Thank you for the feedback! Removing the table { height: 100%; } did not work because it doesn't stretch the table to the bottom of the page. This stretching is what I wanted, but I think this is also what caused the overly inflated <tr> which this question refers to.

The solution to this was more of an accident:

<tr style="height: 0;">
  ...
</tr>

With this, the row shrinks to the size of its content, while the table still stretches to the bottom of the page. Not sure if this is a "healthy" solution, but is sure works.

Answer from Jens on Stack Overflow
🌐
W3Schools
w3schools.com › html › html_table_sizes.asp
HTML Table Sizes
HTML tables can have different sizes for each column, row or the entire table. Use the style attribute with the width or height properties to specify the size of a table, row or column.
Discussions

Html table resize height and td height - HTML & CSS - SitePoint Forums | Web Development & Design Community
Hi, I have a html table and I am unable to change his height value to fit the browser window height though it was set to height: 100% in CSS; so to change the size dynamically I have done something with javascript change the height of tbody, but doing this the height of each td has been stretched; ... More on sitepoint.com
🌐 sitepoint.com
0
November 10, 2010
css - Auto height of table-row - Stack Overflow
In JSFiddle example you can see 2 table-rows. I need the first one's height to be set automatically. Second one's height need to be set to the bottom of the page. But the browser sets table row hei... More on stackoverflow.com
🌐 stackoverflow.com
html - Setting table row height - Stack Overflow
Not sure if it has something to ... using HTML5. 2017-08-27T15:18:22.723Z+00:00 ... Also, in my experience, if you set a height on tr and then a 100% height or any height on the td inside it, I believe the system thinks that the height is set on the td and it doesn't follow height of the tr and the row is set to ... More on stackoverflow.com
🌐 stackoverflow.com
css - HTML table dynamic height for one cell - Stack Overflow
Is it possible to have a table that distributes the cell heights like the following? ______________________________________ | fixed height | |________________________________... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Team Treehouse
teamtreehouse.com › community › how-do-you-resize-table-row-height-in-html
How do you resize table row height in HTML? (Example) | Treehouse Community
November 29, 2014 - As Hugo said, tables should be styled through your CSS. Examples: /* Changing row height */ tr { height: 20px; } /* Changing cell width. Don't forget th!
🌐
SitePoint
sitepoint.com › html & css
Html table resize height and td height - HTML & CSS - SitePoint Forums | Web Development & Design Community
November 10, 2010 - Hi, I have a html table and I am unable to change his height value to fit the browser window height though it was set to height: 100% in CSS; so to change the size dynamically I have done something with javascript change the height of tbody, but doing this the height of each td has been stretched; I adjust the td height of each row within tbody; So I want to obtain a higher tbody and td with normal height (15px), but there is something wrong in the code.
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-fix-the-height-of-rows-in-the-table
How to fix the height of rows in the table? - HTML
Here, we set the height of table rows using CSS, ensuring that all rows maintain a uniform height. This approach also allows for more flexibility with additional styling, such as handling overflow. ... <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>How to fix height of table tr?</title> <style> table, td { border: 1px solid black; } tr { height: 200px; } </style> </head> <body> <table> <!-- row with fixed height--> <tr> <td> Height of this row remains the same on varying screen-size </td> <td>Geeks for Geeks</td> <td> Geeks for Geeks is a Computer Science Portal created with the goal of providing well-written, well-thought and well-explained solutions for selected questions.
Published   September 17, 2024
🌐
GitHub
github.com › Budibase › budibase › discussions › 5437
Table row height customization · Budibase/budibase · Discussion #5437
I found that the height is controlled by the variable --row-height · which is set on the table wrapper element.
Author   Budibase
Find elsewhere
🌐
Result University
resultuniversity.com › html › html-table-width-height
HTML Table Size: Width & Height of Columns & Rows
When creating HTML tables for a website, we can make different parts of the table different sizes. It means we can make some columns wide or narrower, some rows taller or shorter, or even change the size of the entire table. Using the style attribute, we can set the width or height for the table, a row, or a column.
🌐
W3C
w3.org › TR › CSS22 › tables.html
17 Tables
The height of a 'table-row' element's ... the minimum height (MIN) required by the cells. A 'height' value of 'auto' for a 'table-row' means the row height used for layout is MIN....
🌐
Bryntum
forum.bryntum.com › board index › bryntum ui components › bryntum grid
Auto adjust height of row when text spans multiple rows? - Bryntum Support Forums
This was marked resolved, how was it implemented - I assume I still need a renderer function to return the raw HTML but there is a column property that will mean I don't need to set the cell height manually? ... Yes, there is (in still unreleased version 4.1.0, available in Customer Zone) a new autoHeight config on Column. When set to true, the cells height will be measured after running the renderer and that height will be used to determine the row height (highest height on a row applies).
Top answer
1 of 1
1

You might want this:

1) I gave height:auto to table, and here width:80% to table is optional.

2) The Div inside td is given height:60px;(just random to bring up scroll-bar), along with overflow:auto;.

3) The first and second td's have specific height:30px;

Check this out:

<table style="height:auto; width:80%;" border=1>
    <tr>
        <td height="30px">First element</td>
    </tr>
    <tr>
        <td>
            <!-- Div for scroll functionality if content is too high -->
            <div style="overflow:auto; height: 60px;">
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
            </div>
        </td>
    </tr>
    <tr>
        <td height="30px">last element</td>
    </tr>
</table>

Update : No Specific Height

Here in a update i used max-height

<table style="height:auto; width:75%; margin:0px auto;" border=1>
    <tr>
        <td height="30px">First element</td>
    </tr>
    <tr>
        <td>
            <!-- Div for scroll functionality if content is too high -->
            <div style="overflow:auto; max-height:100px;">
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
                Dynamic content which needs to be scrolled sometimes
            </div>
        </td>
    </tr>
    <tr>
        <td height="30px">last element</td>
    </tr>
</table>

Note: If you want to use % for max-height give height and width equals 100% to your body.

🌐
HTML.com
html.com › attributes › td-width
Stop Using To Set Table Width In HTML: Here's Why »
January 24, 2020 - <style> .tall-row td { height: 200px; } </style> <table class="tall-row"> <tr> <th>Thin</th> <th>Really Really Really Wide</th> </tr> <tr> <td>Little</td> <td>Lots and lots and lots and lots of content, so much that it will require a line break.</td> </tr> </table> Your browser should render this code in a way that is virtually identical to the effect of the width attribute. Let’s see if it does: ... To be honest, I’m not sure why’d you want to control row height. It makes a lot more sense to control the margin and padding around the contents of the <td> element and let the browser automatically set the row height based on that information.
🌐
W3Schools
w3schools.com › css › tryit.asp
W3Schools online HTML editor
The W3Schools online code editor allows you to edit code and view the result in your browser
🌐
GitHub
github.com › olifolkerd › tabulator › issues › 1972
Dynamically sized table with maximum height · Issue #1972 · olifolkerd/tabulator
April 11, 2019 - I tried setting this: max-height: 250px; height: auto; set on the table's style - my hope was that, the table would grow with each row (like with auto) until it reaches 250px, and then go into Virtual DOM mode and have a scrollbar.
Author   takuy
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › system.web.ui.htmlcontrols.htmltablerow.height
HtmlTableRow.Height Property (System.Web.UI.HtmlControls) | Microsoft Learn
Table1.Rows[i].BgColor = BgColorSelect.Value; Table1.Rows[i].BorderColor = BorderColorSelect.Value; Table1.Rows[i].Height = HeightSelect.Value; } } </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>HtmlTableRow Example</title> </head> <body> <form id="form1" runat="server"> <h3>HtmlTableRow Example</h3> <table id="Table1" style="border-width:1; border-color:Black" runat="server"> <tr> <td> Cell 1. </td> <td> Cell 2. </td> </tr> <tr> <td> Cell 3. </td> <td> Cell 4. </td> </tr> </table> <hr /> Select the display settings for the rows in the table: <br /><br /> BgColor: <select