当我使用字体标签时,在html标签中出现错误 [英] When i use font tag getting error in html tag

查看:131
本文介绍了当我使用字体标签时,在html标签中出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我使用<font color="#525C65">标记时出现错误,属性字体"已过时.

pls.help.

Hi,

when i use <font color="#525C65"> tag i am getting Error, Attribute ''font'' is outdated tag.

pls.help.

推荐答案

HTML 4删除了此标记,应该删除它.万维网联盟(W3C,负责HTML标准的人员)承认,在样式方面,他们误认为HTML3严重错误.
参考:
http://www.w3schools.com/html/html_styles.asp [ http://www.w3schools.com/css/css_intro.asp [
HTML 4 Depricated this tag, you should get rid of it. The World Wide Web Consortium (W3C, the people responsible for the HTML standard) admit that they got HTML3 badly wrong when it comes to styling.
Refs:
http://www.w3schools.com/html/html_styles.asp[^]
and
http://www.w3schools.com/css/css_intro.asp[^]

HTML was orignally about document content not document format the W3C started to mix these up in HTML, the result was things like the <font> tag, and it made things ugly. The W3C are in the process of removing these tags in the standard thankfully. New browsers following the standard do not need to support this tag. My advice is to get rid of the <font> tags and replace with stylesheets if at all practical.


阅读此处(BTW的绝佳来源) CSS [
Read here (an excellent source BTW) http://www.w3schools.com/tags/tag_FONT.asp[^] and they will tell you that the font tag is deprecated. They continue with saying to use CSS[^] instead to do the styling.

Best Regards,

-MRB


请勿使用font标签!这是一个非常糟糕的样式,并且很难维护.始终使用CSS.

—SA
Never use font tag! This is a very bad style and this is extremely hard to maintain. Always use CSS.

—SA


这篇关于当我使用字体标签时,在html标签中出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆