<!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>
<title>table标签与样式的例子</title>
<style type="text/css">
table
{
border: solid 1px black;
border-collapse: collapse;
}
td,th
{
border: solid 1px blue;
width: 100px;
text-indent: 8px;
}
.col1
{
text-align: center;
}
</style>
</head>
<body>
<table style="">
<caption><b>这里是caption</b></caption>
<thead>
<tr><th style="width: 60px;" class="col1">No</th><th style="width: 100px;">Title</th><th style="width: 200px;">Description</th></tr>
</thead>
<tbody>
<tr><td class="col1">1</td><td>张三</td><td></td></tr>
<tr><td class="col1">2</td><td>李四</td><td></td></tr>
<tr><td class="col1">3</td><td>王五</td><td></td></tr>
<tr><td class="col1">4</td><td>牛七</td><td></td></tr>
<tr><td class="col1">5</td><td>猪八</td><td></td></tr>
</tbody>
<tfoot>
<tr><th>合计:</th><th colspan="2">5人</th></tr>
</tfoot>
</table>
</body>
</html>