Currently, I am facing a challenge while coding in HTML. I am trying to create a table with a header (time range) that fits on a single line without affecting the width of the td elements. Below is the code snippet:
<table style="border:1px solid #8c8c8c;width:100%;border-collapse:collapse;margin-bottom:1.5em">
<thead>
<tr style="border-bottom:1px solid black;background-color:#e9e9e9;font-size:16px">
<th width="24%">
<div style="width:auto">10:35PM - 11:05PM (30 MIN)</div>
</th>
<th style="text-align:right;padding-right:1em;" height="40px;">John Williams</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="baseline" style="width:15%;padding-left:0.5em;">
<div style="line-height:2em;font-weight:bold"> Topic:</div>
</td>
<td valign="baseline">
<div>Resume Review</div>
</td>
</tr>
<tr>
<td valign="baseline" style="width:15%;padding-left:0.5em">
<div style="line-height:2em;font-weight:bold">Phone:</div>
</td>
<td valign="baseline">123445567</td>
</tr>
<tr>
<td valign="baseline" style="width:15%;padding-left:0.5em">
<div style="line-height:2em;font-weight:bold">Email:</div>
</td>
<td valign="baseline"><a href="mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0d475849545f42495f444a58485738353e4d4a444b405845232e2220">[email protected]</a>" target="_blank"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6e24491510151456213c36383c25294b262a28">[email protected]</a></a></td>
</tr>
<tr>
<td valign="baseline">
<div style="line-height:2em;width:auto;font-weight:bold">Student notes:</div>
</td>
<td valign="baseline"> some junk test text</td>
</tr>
</tbody>
</table>
Note: It is essential to resolve this issue without the use of an external CSS file. Any suggestions on how to approach this?