一、内联样式
<p style="color: sienna; margin-left: 20px">
This is a paragraph
</p>
二、内部样式
<head> <style type="text/css"> hr {color: sienna;} p {margin-left: 20px;} body {background-image: url("images/back40.gif");} </style> </head>
三、外部样式
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>
mystyle.css内部书写:
hr {color: sienna;} p {margin-left: 20px;} body {background-image: url("images/back40.gif");}