Interview Question

What is colspan?

Colspan joins table columns for one cell.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

The `colspan` attribute makes one table cell cover more than one column. β€’ It is written inside an element’s opening tag. β€’ The HTML Standard limits which elements may use it and which values are valid. β€’ Browsers apply the attribute when they process the element or the resource it controls.

💡 Simple Example

<td colspan="2">Total</td>

⚡ Quick Revision

Colspan joins table columns for one cell.