Column groups : table cols « Tags « HTML / CSS






Column groups

    


<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>Column groups</title>
</head>

<body>
<table>
  <colgroup span="8" width="75" class="mainColumns" />
  <colgroup span="2" width="50" class="subTotalColumns" />
  <colgroup span="2" width="80" class="totalColumns" />
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
    <td>4</td>
    <td>5</td>
    <td>6</td>
    <td>7</td>
    <td>8</td>
    <td>9</td>
    <td>10</td>
    <td>11</td>
    <td>12</td>
  </tr>
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
    <td>4</td>
    <td>5</td>
    <td>6</td>
    <td>7</td>
    <td>8</td>
    <td>9</td>
    <td>10</td>
    <td>11</td>
    <td>12</td>
  </tr>
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
    <td>4</td>
    <td>5</td>
    <td>6</td>
    <td>7</td>
    <td>8</td>
    <td>9</td>
    <td>10</td>
    <td>11</td>
    <td>12</td>
  </tr>
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
    <td>4</td>
    <td>5</td>
    <td>6</td>
    <td>7</td>
    <td>8</td>
    <td>9</td>
    <td>10</td>
    <td>11</td>
    <td>12</td>
  </tr>
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
    <td>4</td>
    <td>5</td>
    <td>6</td>
    <td>7</td>
    <td>8</td>
    <td>9</td>
    <td>10</td>
    <td>11</td>
    <td>12</td>
  </tr>
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
    <td>4</td>
    <td>5</td>
    <td>6</td>
    <td>7</td>
    <td>8</td>
    <td>9</td>
    <td>10</td>
    <td>11</td>
    <td>12</td>
  </tr>
</table>
</body>
</html>

   
    
    
  








Related examples in the same category

1.'cols' establishes the number of columns in a table
2.Fixed Table Sized Columns
3.Maximum-width Sized Columns
4.Minimum-width Sized Columns
5.Column width
6.Shrinkwrapped Table: width auto, width 20%
7.Shrinkwrapped Table: 20%, 20%, 20%, 20%, 20%
8.Equal Content-sized Columns
9.Fixed Table and Undersized Columns
10.Sized Table cannot be undersized
11.stretched table with undersized column
12.Percentage-proportioned Columns: 50%, 50%
13.Percentage-proportioned Columns: 20%, 20%
14.Percentage-proportioned Columns: 80%, 80%
15.Percentage-proportioned Columns: 80%, 20%
16.Percentage-proportioned Columns: 80%, 20%, 50%