AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

HTML Table Rowspan and Colspan


HTML Tutorial » HTML Table Rowspan and Colspan

- rowspan: Allows a single table cell to span the height of more than one cell or row.
- colspan: Allows a single table cell to span the width of more than one cell or column.
Both colspan and rowspan are attributes of the two table-cell elements, <th> and <td>.

Syntax
<td rowspan="number">
<td colspan="number">


HTML Table rowspan - examples


Example:
Example 1 HTML Table rowspan:

<!DOCTYPE html>
<html>
<head>
<title>HTML Table Rowspan</title>
</head>
<body>
<table style="background:#FFFFCC; width:100%; border:thick #FF3333">
<tr>
<td style="border:1px solid #006699; witdh:100%;"> January </td>
<td style="border:1px solid #FF3333; witdh:100%;"> 12 </td>
<td style="border:1px solid #FF3333; witdh:100%;"> 08 </td>
<td rowspan="3" style="border:1px solid #00FF66; witdh:100%; background:#00FF66"> 23 </td>
</tr>
<tr>
<td style="border:1px solid #006699; witdh:100%;"> February </td>
<td rowspan="2" style="border:1px solid #FF3333; witdh:100%; background:#FFAAAA"> 14 </td>
<td style="border:1px solid #FF3333; witdh:100%;"> 09 </td>
</tr>
<tr>
<td style="border:1px solid #006699; witdh:100%;"> March </td>
<td style="border:1px solid #FF3333; witdh:100%;"> 06 </td>
</tr>
</table>
</body>
</html>
Note: Browser Support Rrowspan


HTML Table colspan - examples


Example:
Example 1 HTML Table colspan:

<!DOCTYPE html>
<html>
<head>
<title>HTML Table Colspan</title>
</head>
<body>
<table style="background:#FFFFCC; width:100%; border:thick #FF3333">
<tr>
<td style="border:1px solid #006699; witdh:100%;"> January </td>
<td colspan="2" style="border:1px solid #FF3333; witdh:100%; background:#66FFFF"> 12 </td>
<td style="border:1px solid #00FF66; witdh:100%;"> 23 </td>
</tr>
<tr>
<td style="border:1px solid #006699; witdh:100%;"> February </td>
<td style="border:1px solid #FF3333; witdh:100%;"> 14 </td>
<td style="border:1px solid #FF3333; witdh:100%;"> 09 </td>
<td style="border:1px solid #FF3333; witdh:100%;"> 09 </td>
</tr>
<tr>
<td style="border:1px solid #006699; witdh:100%;"> March </td>
<td colspan="3" style="border:1px solid #FF3333; witdh:100%; background:#66FFFF"> 06 </td>
</tr>
</table>
</body>
</html>
Note: Browser Support Colspan


html table rowspan and colspan
HTML Table Rowspan and Colspan - html tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.