<table>
<colgroup>
<col />
<col span="2" class="multiColumn" />
</colgroup>
<thead>
<tr>
<th></th>
<th scope="col">C1</th>
<th scope="col">C2</th>
<th scope="col">C3</th>
<th scope="col">C4</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Row 1</th>
<td>cell</td>
<td>cell</td>
<td>cell</td>
<td>cell</td>
</tr>
</tbody>
</table>
<button id="increase">Increase column span</button>
<button id="decrease">Decrease column span</button>
<div>The first <col> spans <output>2</output> actual column(s).</div>HTMLTableColElement: span property / notebook
HTMLTableColElement: span property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.