dreamweaver随记---关于表格

来源:互联网 发布:微博网络出错怎么办 编辑:程序博客网 时间:2024/04/30 00:17

注意:<caption></caption>标题的意思,其后必须跟着得是<table>

             <table> 中可以用<th>来定义标题

 

 

<!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 width="300" border="1" cellspacing="0" cellpadding="0" summary="这是一个销售的数据表格">
  <caption>
    产品销售表
  </caption>
  <tr>
    <th scope="col">地区</th>
    <th scope="col">销售量</th>
    <th scope="col">收入</th>
  </tr>
  <tr>
    <th scope="row">华北</th>
    <td>100</td>
    <td>200</td>
  </tr>
  <tr>
    <th scope="row">华东</th>
    <td>2000</td>
    <td>30000</td>
  </tr>
</table>
</body>
</html>