实例代码:
<!doctype html>
<head>
<meta charset="utf-8">
<style>
table,tr,td,th{
border-collapse:collapse;
border:1px solid #000000;
width:600px;
height:40px;
text-align:center;
}
th{
background-color:#000000;
color:#ffffff;
}
tr:nth-child(even){
background-color:#E8E8E8;
}
</style>
</head>
<html>
<body>
<table >
<tr>
<th>显示结果</th>
<th>描述</th>
<th>实体名称</th>
<th>实体编号</th>
</tr>
<tr>
<td></td>
<td>空格</td>
<td>&nbsp;</td>
<td>&#160;</td>
</tr>
<tr>
<td><</td>
<td>小于号</td>
<td>&lt;</td>
<td>&#60;</td>
</tr>
<tr>
<td>></td>
<td>大于号</td>
<td>&gt;</td>
<td>&#62;</td>
</tr>
<tr>
<td>&</td>
<td>和号</td>
<td>&amp;</td>
<td>&#38;</td>
</tr>
<tr>
<td>"</td>
<td>引号</td>
<td>&quot;</td>
<td>&#34;</td>
</tr>
<tr>
<td>'</td>
<td>撇号</td>
<td>&apos;(IE)</td>
<td>&#39;</td>
</tr>
<tr>
<td>¢</td>
<td>分(cent)</td>
<td>&cent;</td>
<td>&#162;</td>
</tr>
<tr>
<td>£</td>
<td>镑(pound)</td>
<td>&pound;</td>
<td>&#163;</td>
</tr>
<tr>
<td>¥</td>
<td>元(yen)</td>
<td>&yen;</td>
<td>&#165;</td>
</tr>
<tr>
<td>€</td>
<td>欧元(euro)</td>
<td>&euro;</td>
<td>&#8364;</td>
</tr>
<tr>
<td>§</td>
<td>小节</td>
<td>&sect;</td>
<td>&#167;</td>
</tr>
<tr>
<td>©</td>
<td>版权(copyright)</td>
<td>&copy;</td>
<td>&#169;</td>
</tr>
<tr>
<td>®</td>
<td>注册商标</td>
<td>&reg;</td>
<td>&#174;</td>
</tr>
<tr>
<td>™</td>
<td>商标</td>
<td>&trade;</td>
<td>&#8482;</td>
</tr>
<tr>
<td>×</td>
<td>乘号</td>
<td>&times;</td>
<td>&#215;</td>
</tr>
<tr>
<td>÷</td>
<td>除号</td>
<td>&divide;</td>
<td>&#247;</td>
</tr>
</table>
</body>
</html>
运行效果:
评论