怎样在html文档中引用css?

怎样在html文档中引用css?

以链接的形式调用外部CSS文件
<Head>
<link rel="stylesheet" type="text/css" href="Css.css" />
</Head>

或者直接将CSS写在页面中
<Head>
<style type="text/css">
<!--
body {
font-family: "宋体";
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
text-decoration: none;
}

-->
</style>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2020-05-30
以链接的形式调用外部CSS文件
<Head>
<link
rel="stylesheet"
type="text/css"
href="Css.css"
/>
</Head>
或者直接将CSS写在页面中
<Head>
<style
type="text/css">
<!--
body
{
font-family:
"宋体";
font-size:
12px;
font-style:
normal;
line-height:
normal;
font-weight:
normal;
text-decoration:
none;
}
-->
</style>
第2个回答  2006-05-24
应用外部CSS当然还要先建一个以.CSS为后缀的文件,就是样式文件!
相似回答