php——学习笔记,探索表格标签

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>练习输出表格</title>
</head>


<body>
<table border="5" width="250">
<tbody>
<tr>
<td width="200" height="70" align="center">1</td>
<td width="100" height="50" align="center">2</td>
<td width="100" height="50" align="center">3</td>
</tr>
<tr>
<td width="100" height="50" align="center">4</td>
<td width="100" height="50" align="center">5</td>
<td width="100" height="50" align="center">6</td>
<td width="100" height="50" align="center">6</td>
</tr>
</tbody>
</table>
</body>

</html>


我发现html是先满足在前面的标签,再满足后面的。

<table border="5" width="250">是设置边框粗细为5个像素,宽度是250.因为没有设置长度所以长度由下面的标签决定。

<tbody>是表格体

<tr>为一行

<td>为一格 <td width="200" height="70" align="center">1</td>是设置了表格宽为200个像素,高为70个像素,字体对齐方式居中。

如果说前面表格的大小已经写好,那么这些单元格的大小会首先受到表格大小的限制

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值