HTML form label

Form Label

<table> define html tables.
<caption> define the table title. (automatic centering)
<tr> define rows in a table.
<th>define header cells within a table. (automatic centering)
<td> define columns in a table.
<thead> define the header of the table. (automatic centering)
<tbody> define the body of the table.
<tfoot> define the footer of the table.


Table properties

border border style。
rowspan define the number of rows that a cell can span.
colspan define the number of columns that a cell can span.
width define the width of the table.
height define the height of the table.
align define the horizontal alignment of the content of the table.


Example 1

code part

<table border="1" width="600px">
        <caption>information table</caption>
        <tfoot>
        <tr align="center">
            <td>002</td>
            <td>mike</td>
            <td>28</td>
            <td>man</td>
            <td>2020</td>
        </tr>
        </tfoot>
        <tbody>
        <tr align="center">
            <td>001</td>
            <td>bob</td>
            <td>18</td>
            <td>man</td>
            <td>2020</td>
        </tr>
        </tbody>
        <thead>
        <tr>
            <th>number</th>
            <th>name</th>
            <th>age</th>
            <th>sex</th>
            <th>class</th>
        </tr>
        </thead>
    </table>

effect display
在这里插入图片描述


Hint:
<thead> first
<tbody> second
<tfoot> third
<tr ailgn="center"> text center


Example 2

rowspan & colspan

code part

<table border="1" width="600px">
        <tr>
            <th rowspan="2">A</th>
            <th colspan="2">B</th>
            <th>C</th>
        </tr>
        <tr align="center">
            <td>111</td>
            <td>222</td>
            <td>333</td>

        </tr>
        <tr align="center">
            <td>444</td>
            <td>555</td>
            <td>666</td>
            <td></td>
        </tr>
    </table>

effect display
在这里插入图片描述


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值