课程表及table应用

Original 2019-04-01 04:10:28 291
abstract:<!DOCTYPE html><html><head>    <title>NO.1</title></head><body><!--table:定义表格th:定义表格中表头tr:定义表格中表行td:定义表格中单元格--><table border="1.5px&qu

<!DOCTYPE html>

<html>


<head>

    <title>NO.1</title>

</head>


<body>

<!--table:定义表格

th:定义表格中表头

tr:定义表格中表行

td:定义表格中单元格-->

<table border="1.5px" widtd="1200px" height="800px" bgcolor="#ccc" bordercolor="000" align="center" cellspacing="0">

<!--外框像素       宽度           高度           背景颜色       边框颜色          对齐方式       间隔          -- >

    <tr height="100" align="center">

        <th width="200" height="100" bgcolor="#ccc">课程表</th>

        <th width="200" height="100" bgcolor="red">星期一</th>

        <th width="200" height="100" >星期二</th>

        <th width="200" height="100" bgcolor="red">星期三</th>

        <th width="200" height="100" >星期四</th>

        <th width="200" height="100" bgcolor="red">星期五</th>

    </tr>

    <tr height="100" align="center">

        <td width="200" height="100" bgcolor="467500" rowspan="4" >上午</th>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

    </tr>

    <tr height="100" align="center">

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

    </tr>

    <tr height="100" align="center">

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

    </tr>

    <tr height="100" align="center">

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

    </tr>

    <tr height="100" align="center">

        <th  width="200" height="100" bgcolor="467500" rowspan="3"align="center">下午</th>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

    </tr>

    <tr height="100" align="center">

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

     </tr>   

     <tr height="100" align="center">

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

        <td width="200" height="100" >语文</td>

        <td width="200" height="100" bgcolor="red">语文</td>

     </tr> 

</table>


</body>


</html>


Correcting teacher:天蓬老师Correction time:2019-04-01 09:31:35
Teacher's summary:表格<table>标签中, 推荐添另<tbody>标签, 以防止 在用js操作时, 无法正确定位单元格

Release Notes

Popular Entries