代表者の戯言

列や行を結合する!

まあ、EXCELと同様だが、列や行を結合する方法としては、下記のサンプルを参照してほしい。ポイントとしては、【td rowspan="2"】の箇所で、下部分を侵食する、【td colspan="2"】で横部分を侵食する、ということだ。


【HTML】

<table>

<caption>3年生クラスにおける対応</caption>

<tr>

<th scope="col">クラス名</th>

<th scope="col">生徒名</th>

<th scope="col">対応方針</th>

</tr>

</thread>


<tbody>

<tr>

<th scope="row">A組</th>

<td>山下</td>

<td rowspan="2">授業中に歩き出すのに注意</td></tr>


<tr>

<th scope="row">B組</th>

<td>近藤</td>

</tr>


<tr>

<th scope="row">C組</th>

<td>久本</td>

<td>授業中に居眠りあり。

<br>寝たら親に電話

</td>

</tr>


<tr>

<th scope="row">D組</th>

<td>野島</td>

<td>いじめの主犯格。警察に相談。</td>

</tr>


<tr>

<th scope="row">E組</th>

<td colspan="2">女子が集団で先生を無視する。</td>

</tr>

</tbody>

</table>


3年生クラスにおける対応
クラス名 生徒名 対応方針
A組 山下 授業中に歩き出すのに注意
B組 近藤
C組 久本 授業中に居眠りあり。
寝たら親に電話
D組 野島 いじめの主犯格。警察に相談。
E組 女子が集団で先生を無視する。