请问HTML中的font标签和style标签到底用哪个?

如题所述


html
4.01
中,font
元素不被赞成使用。

xhtml
1.0
strict
dtd
中,font
元素不被支持。
<style>
标签用于为
html
文档定义样式信息。

style
中,您可以规定在浏览器中如何呈现
html
文档。
type
属性是必需的,定义
style
元素的内容。唯一可能的值是
"text/css"。
外联式样式(属于外部样式表)如:<link
href="001.css"
type="text/css"
rel="stylesheet"/>
嵌入式样式(属于内部样式表)
<style
type="text/css">
.main{
width:1002px;
margin:0
auto;}
</style>
内联式样式
style="font-size:10px;font-color:#fff"
温馨提示:答案为网友推荐,仅供参考
第1个回答  2020-04-20

HTML
4.01
中,font
元素不被赞成使用。

XHTML
1.0
Strict
DTD
中,font
元素不被支持。
标签用于为
HTML
文档定义样式信息。

style
中,您可以规定在浏览器中如何呈现
HTML
文档。
type
属性是必需的,定义
style
元素的内容。唯一可能的值是
"text/css"。
外联式样式(属于外部样式表)如:<link
href="001.css"
type="text/css"
rel="Stylesheet"/>
嵌入式样式(属于内部样式表)
<style
type="text/css">
.main{
width:1002px;
margin:0
auto;}
内联式样式
style="font-size:10px;font-color:#fff"
相似回答