🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
Back to HTML Notes
Topic #33

Colspan & Rowspan


HTML tables can have cells that span over multiple rows and/or columns.


NAME
APRIL
2022
FIESTA

HTML Table - Colspan

To make a cell span over multiple columns, use the colspan attribute:

Example

  <table>
  <tr>
    <th colspan="2">Name</th>

  <th>Age</th>
  </tr>
  <tr>

  <td>Jill</td>
    <td>Smith</td>

  <td>43</td>
  </tr>
  <tr>
    <td>Eve</td>

  <td>Jackson</td>
    <td>57</td>
  </tr>
</table>

Note: The value of the colspan attribute represents the number of columns to span.


HTML Table - Rowspan

To make a cell span over multiple rows, use the rowspan attribute:

Example

  <table>
  <tr>
    <th>Name</th>

  <td>Jill</td>
  </tr>
  <tr>
    <th rowspan="2">Phone</th>

  <td>555-1234</td>
  </tr>
  <tr>

  <td>555-8745</td>
</tr>
</table>

Note: The value of the rowspan attribute represents the number of rows to span.

Want to go beyond the notes?

Join CodingNow 2.0's HTML course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Colspan & Rowspan – FAQs

Quick answers about learning Colspan & Rowspan in HTML.

This free note from CodingNow 2.0 explains Colspan & Rowspan in HTML — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every HTML topic on CodingNow 2.0, including Colspan & Rowspan, is 100% free with no signup required.
With focused practice, most students grasp Colspan & Rowspan in 1–3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) — expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now