<!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=gb2312" />
<title>css文字、文本和背景实例</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<p style="font-size:24px">级联样式表</p> <!--设置了字体大小-->
<p id="t">css是英文Cascading Style Sheets的缩写。</p>
<p id="t">
它是一种用来表现
<a href="http://baike.baidu.com/view/383720.htm?
fromtitle=html&fromid=97049&type=syn">HTML
</a>(
<a href="http://baike.baidu.com/view/597073.htm?fromtitle=
%E6%A0%87%E5%87%86%E9%80%9A%E7%94%A8%E6%A0%87%E8%AE%B0%E8%AF%AD%E8%A8%80
&fromid=6805073&type=syn">标准通用标记语言
</a>的一个应用)或
<a href="http://baike.baidu.com/view/
159832.htm?fromtitle=xml&fromid=86251&type=syn">
XML
</a>(
<a href="http://baike.baidu.com/view/597073.htm?fromtitle=
%E6%A0%87%E5%87%86%E9%80%9A%E7%94%A8%E6%A0%87%E8%AE%B0%E8%AF%AD%E8%A8%80
&fromid=6805073&type=syn">标准通用标记语言
</a>的一个子集)等文件样式的
<a href="http://baike.baidu.com/view/246483.htm">计算机语言
</a>。
</p>
<p style="font-size:24px">参考书:</p>
<!--建立表格设置属性-->
<table width="50%" height="200px" border="1" align="center" />
<caption style="font-size:24px"><a
href="http://baike.baidu.com/view/1935786.htm?fr=aladdin">
javdascript权威指南</a></caption>
<tr>
<td>作者</td>
<td>(美)<a href="http://baike.baidu.com/view/4383625.htm">
弗拉纳根</a>
</td>
</tr>
<tr>
<td>定价</td>
<td>139元</td>
</tr>
<tr>
<td>出版社</td>
<td><a href="http://baike.baidu.com/view/156089.htm">
机械工业出版社</a>
</td>
</tr>
</body>
</html>
//style.css
*{font-family:"宋体"}
a{text-decoration:none}/*去除超链接下划线*/
#t{line-height:26px;letter-spacing:0.1em;text-indent:2cm}/*id选择器*/
table{text-align:center;background-color:#fba}/*设置表格文字位置及背景色*/
运行结果: