网页制作中CSS的四种常用方法

1.植入html
<style type="text/css">
<!--
H1 { color: green; font-size: 37px; font-family: impact ;background-color:#FFCCFF}
P { text-indent: 1cm; background: yellow; font-family: courier }
-->
</style>
2.链接
<link rel="stylesheet" href="css.css" type="text/css"/>
3.输入样式表单
输入外部样式表的方法同链接的方法类似。不同之处在于链接法不能同其它方法结合使用,但输入法则可以。例:
<HTML>
<STYLE TYPE="text/css">
<!--
@import url(company.css);
H1 { color: orange; font-family: impact }
-->
</STYLE>
<HEAD>
<TITLE>My First Stylesheet
</TITLE>
</HEAD>
<BODY>
<H1>Stylesheets: The Tool of
the Web Design Gods</H1>
<P>Amaze your friends! Squash
your enemies!</P>
</BODY>
</HTML>
4.在行内加上样式
<H1 STYLE="color: orange; font-family: impact">Stylesheets: The Tool of the Web Design Gods</H1>
作者 郑文亮