@VITSUSAJun 23.2020 — #If the text is non wrapping text then you set the cell to width:1px and use white-space:nowrap. The text in that column will then determine the width of the cell.
table{table-layout:fixed;}
td{width:1px;white-space:nowrap;}
It’s a technique commonly used for images and captions (without the white-space:nowrap) and allows text to wrap at the limits of an image automatically.
Click on the mentioned hyperlink to know more about it –