"if you encounter any errors in SAP, send me a screenshot at pramod@learntosap.com, and I will help you resolve the issue."

HTML Table Colspan & Rowspan Tag –

HTML TUTORIALS-

HTML Table Colspan & Rowspan Tag –

Introduction-

HTML Table Colspan & Rowspan Tag -

🔷 What is colspan? -

- colspan allows a cell to span across multiple columns:-

🔷 What is rowspan? -

- rowspan allows a cell to span across multiple rows:-

Trulli Trulli

✅ 2- Examples of HTML tables using colspan and rowspan each, with explanations so you can see how they work.and Follow Steps-

-)✅ Examples with colspan-👇


<table border="1"> 
  <tr>
    <th colspan="2">Name & Contact</th>
  </tr>
  <tr>
    <td>Pramod Behera</td>
    <td>123-456-7890</td>
  </tr>
</table>


Name & Contact
Pramod Behera 123-456-7890

🧱 Examples with colspan- 2– Merging 3 columns-👇


<table border="1">
  <tr>
    <th colspan="3">Employee Details</th>
  </tr>
  <tr>
    <td>ID</td>
    <td>Name</td>
    <td>Department</td>
  </tr>
</table>

Employee Details
ID Name Department

🧱 Examples with rowspan- 1 – Merging 2 rows:👇

<table border="1">
  <tr>
    <td rowspan="2">Math</td>
    <td>Pramod</td>
  </tr>
  <tr>
    <td>Pooja</td>
  </tr>
</table>

Math Pramod
Pooja

🧱 Examples with rowspan 2 – Merging 3 rows:-👇


<table border="1">
  <tr>
    <td rowspan="3">Project A</td>
    <td>Phase 1</td>
  </tr>
  <tr>
    <td>Phase 2</td>
  </tr>
  <tr>
    <td>Phase 3</td>
  </tr>
</table>


Project A Phase 1
Phase 2
Phase 3

🔍 Tag Breakdown-

Table Tag Breakdown

-) Table Tag Breakdown -

Tag Purpose
<table> Defines the table
<tr> Table row
<th> Table header (bold + centered by default)
<td> Table data (cell content)
<caption> Defines a table caption
<colgroup> Specifies a group of one or more columns in a table for formatting
<col> Specifies column properties for each column within a (colgroup) element
<thead> Groups the header content in a table
<tbody> Groups the body content in a table

Live Code Preview


May Be Like Important Link-

-Specify a valid MRP Procedure

-Movement type 161 is not allowed

-Specify a valid MRP Procedure

-Cash Journal Entry (PETTY CASH)