HTML====表格案例

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<table border="1" width="600px" height="300px" align="center">
  <caption><h2>学生基本信息表</h2></caption>

  <thead bgcolor="cyan">
   <th>学号</th>
   <th>姓名</th>
   <th>年龄</th>
   <th>性别</th>
  </thead>
  <tbody bgcolor="#cccccc">
   <tr>
    <td>1001</td>
    <td>阿牛</td>
    <td>21</td>
    <td></td>
   </tr>
   <tr>
    <td>1002</td>
    <td>阿花</td>
    <td>20</td>
    <td></td>
   </tr>
   <tr>
    <td>1003</td>
    <td>张三</td>
    <td>19</td>
    <td></td>
   </tr>
   <tr>
    <td>1004</td>
    <td>李四</td>
    <td>22</td>
    <td></td>
   </tr>
  </tbody>

  <tfoot bgcolor="yellow" align="center">
   <tr>
    <td width="25%">总计人数</td>
    <td colspan="3">4</td>
    
   </tr>
  </tfoot>
 </table>
</body>
</html>

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<table border="2" width="400px" height="200px" align="center" bgcolor="red" bgcolor="#cccccc" background="../image/qq.jpg" cellspacing="0" cellpadding="0px">
		<tr align="right" valign="top">
			<td>hello</td>
			<td>hello</td>
			<td>hello</td>
		</tr>
		<tr align="center" valign="middle" bgcolor="red">
			<td>hello</td>
			<td bgcolor="yellow" valign="bottom">hello</td>
			<td>hello</td>
		</tr>
		<tr valign="boottom" background="../image/qq.jpg">
			<td>hello</td>
			<td>hello</td>
			<td>hello</td>
		</tr>
	</table>
</body>
</html>

在这里插入图片描述

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值