create dynamic table bootstrap code example

Example 1: bootstrap table combine columns

<thead>
  <tr>
    <th rowspan="2">State</th>
    <th rowspan="2">Utilities Company</th>
    <th colspan="3">Summer Period</th>
  </tr>
  <tr>
    <th>data1</th>
    <th>data2</th>
    <th>data3</th>
  </tr>
</thead>

Example 2: bootstrap break table row

I have this : 
|  1  |  2  |  3  |        4        |

I want this : 
|     1     |     2     |     3     |
|                 4                 |

- HTML :

<tr>
  <th scope="row">1</th>
  <td>2</td>
  <td>3</td>
  <td>4</td>
</tr>

- CSS : 

td:nth-child(4) {
  display: block;
  width: 100%;
}
th,
td:nth-child(2),
td:nth-child(3) {
  display: inline-block;
  width: 33%;
}

Tags:

Html Example