<table class="table">
<thead>
<tr class="色">
<th>見出し1</th>
<th>見出し2</th>
</tr>
</thead>
<tbody>
<tr>
<td>テーブルセル</td>
<td>テーブルセル</td>
</tr>
</tbody>
</table>
基本はこちらの形になります。
bootstrapでは他にもclassを追加することで、テーブルの外観を変更できます。
行の色を交互に変更
<table class="table table-striped">
tableのclassにtable-stripedを追加します。
テーブルに縦線を追加
<table class="table table-bordered">
tableのclassにtable-borderedを追加します。
見出しの行の色を変更
theadのtrのclassに"色"と入っていますが、そこに希望の色のclassを指定します。
<tr class="danger">
色は以下の5種類あります。
・指定無し:白
・danger:赤
・active:灰色
・success:緑色
・warning:黄色