佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > 表格(TABLE)標(biāo)記(TAGS)詳細(xì)介紹

表格(TABLE)標(biāo)記(TAGS)詳細(xì)介紹

熱門標(biāo)簽:使用U盤裝系統(tǒng) 檢查注冊表項(xiàng) 智能手機(jī) 硅谷的囚徒呼叫中心 阿里云 百度競價點(diǎn)擊價格的計算公式 美圖手機(jī) 網(wǎng)站建設(shè)
表格的基本語法

<table>...</table> - 定義表格
<tr> - 定義表行
<th> - 定義表頭
<td> - 定義表元(表格的具體數(shù)據(jù))

帶邊框的表格: 


復(fù)制代碼
代碼如下:

<table border>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>
Food Drink Sweet
A B C


不帶邊框的表格:

復(fù)制代碼
代碼如下:

<table>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

Food Drink Sweet
A B C

 跨多行、多列的表元(Table Span)

跨多列的表元 <th colspan=#>


復(fù)制代碼
代碼如下:

<table border>
<tr><th colspan=3> Morning Menu</th>
<tr><th>Food</th> <th>Drink</th> <th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

Morning Menu
Food Drink Sweet
A B C

跨多行的表元 <th rowspan=#>



復(fù)制代碼
代碼如下:

<table border>
<tr><th rowspan=3> Morning Menu</th>
<th>Food</th> <td>A</td></tr>
<tr><th>Drink</th> <td>B</td></tr>
<tr><th>Sweet</th> <td>C</td></tr>
</table>
Morning Menu Food A
Drink B
Sweet C

 表格尺寸設(shè)置

<table border=#>

邊框尺寸設(shè)置: 


復(fù)制代碼
代碼如下:

<table border=10>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>
Food Drink Sweet
A B C

<table border width=# height=#>

表格尺寸設(shè)置: 


復(fù)制代碼
代碼如下:

<table border width=170 height=100>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>
Food Drink Sweet
A B C

<table border cellspacing=#>

表元間隙設(shè)置: 


復(fù)制代碼
代碼如下:

<table border cellspacing=10>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>
Food Drink Sweet
A B C

<table border cellpadding=#>

表元內(nèi)部空白設(shè)置: 


復(fù)制代碼
代碼如下:

<table border cellpadding=10>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>
Food Drink Sweet
A B C

 表格內(nèi)文字的對齊/布局

<tr align=#>

<th align=#> #=left, center, right

<td align=#>

復(fù)制代碼
代碼如下:

<table border width=160>
<tr>
<th>Food</th><th>Drink</th><th>Sweet</th>
<tr>
<td align=left>A</td>
<td align=center>B</td>
<td align=right>C</td>
</table>

Food Drink Sweet
A B C

<tr valign=#>

<th valign=#> #=top, middle, bottom, baseline

<td valign=#>

復(fù)制代碼
代碼如下:

<table border height=100>
<tr>
<th>Food</th><th>Drink</th>
<th>Sweet</th><th>Other</th>
<tr>
<td valign=top>A</td>
<td valign=middle>B</td>
<td valign=bottom>C</td>
<td valign=baseline>D</td>
</table>

Food Drink Sweet Other
A B C D

 表格在頁面中的對齊/布局(Floating Table)

<table align=left>


復(fù)制代碼
代碼如下:

<table align="left" border>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

My favorites...<br> cookies, chocolates, and more.
Food Drink Sweet
A B C

My favorites...
cookies, chocolates, and more.

<table align=right>

Food Drink Sweet
A B C

My favorites...
cookies, chocolates, and more.

<table vspace=# hspace=#> #=space value


復(fù)制代碼
代碼如下:

<table align="left" border vspace=20 hspace=30>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

 My favorites...<br> cookies, chocolates, and more.
Food Drink Sweet
A B C

My favorites...
cookies, chocolates, and more.

 表格的標(biāo)題

<caption align=#> ... </caption> #=left, center, right

復(fù)制代碼
代碼如下:

<table border>
<caption align=center>Lunch</caption>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

Lunch

Food Drink Sweet
A B C

<caption valign=#> ... </caption> #=top, bottom

valign=top is default.


復(fù)制代碼
代碼如下:

<table border>
<caption valign=bottom>Lunch</caption>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

Food Drink Sweet
A B C
Lunch

標(biāo)簽:懷化 黃山 賀州 通遼 湖北 山南 湘潭 煙臺

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《表格(TABLE)標(biāo)記(TAGS)詳細(xì)介紹》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    盈江县| 玛沁县| 青川县| 宝丰县| 油尖旺区| 金沙县| 马龙县| 寻乌县| 建平县| 丹凤县| 金坛市| 隆子县| 岳普湖县| 拜泉县| 松滋市| 武鸣县| 清涧县| 黑河市| 安新县| 抚松县| 盘山县| 西乌| 定西市| 吉木乃县| 古浪县| 乐清市| 安乡县| 厦门市| 清水河县| 无锡市| 岑巩县| 吉首市| 营口市| 昭觉县| 兴和县| 周口市| 达日县| 汾西县| 台安县| 运城市| 延吉市|