色名はこちらを参照してください。<table border>
<tr align=center>
<td width=100 height=50 bgcolor=pink>- PINK -</td>
<td width=100 bgcolor=yellow>- YELLOW -</td>
<td width=100 bgcolor=cyan>- CYAN -</td>
</tr>
</table>
- PINK - |
- YELLOW - |
- CYAN - |
・colspan= で結合するセルの列数を指定します。<table width=200 height=80 border>
<tr>
<th colspan=3>教科</th>
</tr>
<tr>
<td>国語</td>
<td>数学</td>
<td>英語</td>
</tr>
</table>
・rowspan= で結合するセルの行数を指定します。<table width=150 height=120 border>
<tr>
<th rowspan=3>教科</th>
<td>国語</td>
</tr>
<tr>
<td>数学</td>
</tr>
<tr>
<td>英語</td>
</tr>
</table>
・nowrap を設定すると,セル内のテキストの折り返しを禁止できます。<table border width=600>
<tr>
<td>普通,セル内のテキストはこんなふうに自動的に折り返して表示されます。</td>
<td nowrap>nowrap を設定すると,セル内のテキストの折り返しを禁止できます。</td>
</tr>
</table>
普通,セル内のテキストはこんなふうに自動的に折り返して表示されます。 |
nowrap を設定すると,セル内のテキストの折り返しを禁止できます。 |
rowspan,colspan を組み合わせた例です。
<th> は各行,列の見出しで,デフォルトで字体がボールド,配置は中央揃えになります。
<table border=3 cellpadding=7 cellspacing=2>
<caption align=top>本日の日程</caption>
<tr>
<th width=30> </th>
<th>1年</th>
<th>2年</th>
<th>3年</th>
</tr>
<tr>
<th>1</th>
<td colspan=3 align=center align=center>平常授業</td>
</tr>
<tr>
<th>2</th>
<td rowspan=3 colspan=2>身体測定</td>
<td rowspan=3 align=center>テ<br>ス<br>ト</td>
</tr>
<tr>
<th>3</th>
</tr>
<tr>
<th>4</th>
</tr>
<tr>
<th>5</th>
<td colspan=3 align=center>LHR</td>
</tr>
<tr>
<th>6</th>
<td colspan=3 align=center>クラブ</td>
</tr>
</table>
本日の日程
|
1年 |
2年 |
3年 |
1 |
平常授業 |
2 |
身体測定 |
テ ス ト |
3 |
4 |
5 |
LHR |
6 |
クラブ |
戻る
Copyright © 2008 Cercando All Rights Reserved.