Full width home advertisement

Welcome Home

Post Page Advertisement [Top]

Colspan and Rowspan Attributes

Colspan attribute is used to merge two or more columns together into a single column. 

Rowspan attribute is used to merge two or more rows together into a single row.


<!DOCTYPE html>



<title>Scholars Colspan or Rowspan Test</title>



<table border="1" cellpadding="5" cellspacing="5">


<th>Column 1</th>

<th>Column 2</th>

<th>Column 3</th>



<td rowspan="2">Row 1 Cell 1</td>

<td>Row 1 Cell 2</td>

<td>Row 1 Cell 3</td>



<td>Row 2 Cell 2</td>

<td>Row 2 Cell 3</td>



<td colspan="3">Row 3 Cell 1</td>





See Result:

Column 1
Column 2
Column 3
Row 1 Cell 1
Row 1 Cell 2
Row 1 Cell 3
Row 2 Cell 2
Row 2 Cell 3
Row 3 Cell 1

No comments:

Post a Comment

Bottom Ad [Post Page]