这个时候我们可以用 style="text-aligh"center"
<html>
2 <head>
3 <style type="text/css">
4 h1 {text-align: center}
5 h2 {text-align: left}
6 h3 {text-align: right}
7 </style>
8 </head>
9
10 <body>
11 <h1>这是标题 1</h1>
12 <h2>这是标题 2</h2>
13 <h3>这是标题 3</h3>
14 </body>
15 </html>
修饰文本
<html> 2 <head> 3 <style type="text/css"> 4 h1 {text-decoration: overline} 5 h2 {text-decoration: line-through} 6 h3 {text-decoration: underline} 7 h4 {text-decoration: blink} 8 a {text-decoration: none} 9 </style> 10 </head> 11 12 <body> 13 <h1>这是标题 1</h1> 14 <h2>这是标题 2</h2> 15 <h3>这是标题 3</h3> 16 <h4>这是标题 4</h4> 17 <p><a href="http://www.w3school.com.cn/index.html">这是一个链接</a></p> 18 </body> 19 </html>