Here's a ready-to-run HTML page that uses a table for layout, with a header row and a two-column body.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Table Layout Page</title>
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
background: #f4f6f8;
color: #22303c;
margin: 0;
padding: 24px;
}
/* ---------- Layout table ---------- */
table.layout {
width: 100%;
max-width: 960px;
margin: 0 auto;
border-collapse: collapse;
background: #fff;
border: 1px solid #d7dee5;
box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
table.layout th,
table.layout td {
border: 1px solid #d7dee5;
padding: 16px 20px;
vertical-align: top;
text-align: left;
}
/* ---------- Header row ---------- */
table.layout thead th {
background: #2c5d8f;
color: #fff;
font-size: 1.15rem;
letter-spacing: .02em;
}
/* ---------- Column 1: sidebar ---------- */
table.layout td.col-sidebar {
width: 260px;
background: #eef3f8;
}
/* ---------- Column 2: main content ---------- */
table.layout td.col-main {
/* no width set — the browser gives it the remaining space */
}
/* ---------- Typography ---------- */
h2 {
margin: 0 0 10px;
font-size: 1.05rem;
text-transform: uppercase;
letter-spacing: .06em;
color: #2c5d8f;
}
p { line-height: 1.65; margin: 0 0 12px; }
ul { margin: 0; padding-left: 18px; }
li { margin-bottom: 6px; }
a { color: #1a6fb5; text-decoration: none; }
a:hover { text-decoration: underline; }
tfoot td {
background: #f7f9fb;
font-size: .85rem;
color: #5c6b7a;
text-align: center;
}
</style>
</head>
<body>
<table class="layout">
<!-- Header row: spans both columns -->
<thead>
<tr>
<th colspan="2" scope="colgroup">My Website</th>
</tr>
</thead>
<!-- Body: one row, two columns -->
<tbody>
<tr>
<td class="col-sidebar">
<h2>Navigation</h2>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</td>
<td class="col-main">
<h2>Welcome</h2>
<p>
This page uses a <code><table></code> to create its layout. The header row
spans both columns with <code>colspan="2"</code>, and the row beneath it holds the
two side-by-side columns.
</p>
<p>
The left column has a fixed width, so the right column automatically expands to
fill whatever space is left over.
</p>
</td>
</tr>
</tbody>
<!-- Optional footer row -->
<tfoot>
<tr>
<td colspan="2">© 2025 My Website</td>
</tr>
</tfoot>
</table>
</body>
</html>Table-Based Layout Structure
This page breaks down into a few straightforward table sections:
<th> with colspan="2" spans both columns to act as the page title.<td> is given a fixed width of 260px and a light blue background.<td> has no set width, so it naturally fills the remaining space.<tfoot> row also spans both columns with colspan="2" for a simple copyright line.