HTML——表格标签

  1. 表格


    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title>表格标签</title>
    	</head>
    	<body>
    		<table border="1" width="500px" height="200px" cellspacing="0" cellpadding="10px">
    			<caption>成绩表</caption>
    			<tr height="80px">
    				<th>姓名</th>
    				<th>语文</th>
    				<th>数学</th>
    				<th>英语</th>
    			</tr>
    			<tr align="center" valign="top">
    				<th>tom</th>
    				<td>78</td>
    				<td rowspan="2">76</td>
    				<td>65</td>
    			</tr>
    			<tr>
    				<th>lucy</th>
    				<td>82</td>
    				<!-- <td width="50px" height="50px">76</td> -->
    				<td>71</td>
    			</tr>
    			<tr>
    				<th>jery</th>
    				<td colspan="2">71</td>
    				<!-- <td>71</td> -->
    				<td>70</td>
    			</tr>
    		</table>
    	</body>
    </html>
    
    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title>表格标签</title>
    	</head>
    	<body>
    		<table style="text-align: center; border: dotted 2px green;" border="1" width="500px" height="200px" cellspacing="1">
    			<tfoot>
    				<tr>
    					<td colspan="4">尾巴</td>
    				</tr>
    			</tfoot>
    			<thead>
    				<caption>成绩表</caption>
    				<tr height="80px">
    					<th>姓名</th>
    					<th>语文</th>
    					<th>数学</th>
    					<th>英语</th>
    				</tr>
    			</thead>
    			<tbody>
    				<tr align="center" valign="top">
    					<th>tom</th>
    					<td>78</td>
    					<td rowspan="2">76</td>
    					<td>65</td>
    				</tr>
    				<tr>
    					<th>jery</th>
    					<td>82</td>
    					<!-- <td width="50px" height="50px">76</td> -->
    					<td>71</td>
    				</tr>
    				<tr>
    					<th>coco</th>
    					<td colspan="2">71</td>
    					<!-- <td>71</td> -->
    					<td style="border: double 5px red; color: blue;">70</td>
    				</tr>
    			</tbody>
    			
    		</table>
    	</body>
    </html>
    

     

上一篇:SSM实战——秒杀系统之创建项目、管理依赖、设计数据库


下一篇:【LOJ】#3093. 「BJOI2019」光线