Table with column group : table colgroup « Tags « HTML / CSS

Table with column group


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" lang="en">
<title>HTML/XHTML:  &raquo; Standard HTML/XHTML Tables</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<div class="content">

  <table border="1" frame="box" rules="groups">
  <caption>Fun with Food</caption>
  <col />
  <col align="center" />
  <col align="char" char="." charoff="2" />
  <th bgcolor="yellow">Fruit</th>
  <th bgcolor="yellow">Color</th>
  <th bgcolor="yellow">Cost per pound</th>
  <th colspan="3">This has been another fine table example.</th>




Related examples in the same category

1.'colgroup' Example
2.colgroup span="10"
3.Using colgroup to group columns
4.'span' sets the number of columns in a group
5.colgroup and col tags are used to format entire columns
6.Column Groups