Forgot password?
 Create new account
View 187|Reply 4

Discuz所用的HTML3.2 font标签已废弃

[Copy link]

3146

Threads

8493

Posts

610K

Credits

Credits
66158
QQ

Show all posts

hbghlyj Posted at 2022-4-27 16:35:18 |Read mode
Last edited by hbghlyj at 2023-8-5 13:08:00This is Red
This is Kaiti
This is size 1
  1. [color=Red]This is Red[/color]
  2. [font=楷体]This is Kaiti[/font]
  3. [size=1]This is size 1[/size]
Copy the Code
  1. <font color="Red">This is Red</font>
  2. <font face="楷体 ">This is Kaiti</font>
  3. <font size="1">This is size 1</font>
Copy the Code
developer.mozilla.org/zh-CN/docs/Web/HTML/Element/font
已废弃: 该特性已经从 Web 标准中删除,虽然一些浏览器目前仍然支持它,但也许会在未来的某个时间停止支持,请尽量不要使用该特性。
不要使用这个元素!尽管它在 HTML 3.2 规范化,但在 HTML 4.01 中已废除,因为该元件只和样式相关,接着在 HTML5 过时。

从 HTML 4 开始,HTML 不能在 <style> 元素,或各元素 style 属性以外,表现任何样式信息。今后的网页开发,样式只能使用 CSS 来编写。

<font> 元素的行为,可以通过 CSS 属性实现,以及更好控制。
从 HTML 4 起,HTML 不再传递样式信息(除<style> 元素和所有元素的style属性内容外)。在 HTML5,这个元素已经被彻底移除。对于所有新的网页开发,样式只应该写在 CSS 中。

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-4-28 00:26:10
回复 1# hbghlyj

就是说将来我们论坛上的帖子内的那些字体加大字号、加颜色等的效果都会无法显示?

3146

Threads

8493

Posts

610K

Credits

Credits
66158
QQ

Show all posts

 Author| hbghlyj Posted at 2022-4-28 00:28:35
回复 2# kuing

php源码,把Discuzcode函数改一下就可以了,在以前的帖子里有
帖子内容不用变呀,多好

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-4-28 00:30:46
回复 3# hbghlyj

那到时再说吧

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

abababa Posted at 2022-4-28 08:53:50
回复 2# kuing

我有几个网页的资料也是用了很多font标签,是从别的网站保存回来的,昨天我问maven是不是要改,他说不用,说“我保证这些标记 Deprecated 的标签活得比你的网页长,某个浏览器如果放弃支持这些老旧标记,将很快失去大量市场份额。”

手机版Mobile version|Leisure Math Forum

2025-4-20 22:11 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list