问题描述
我正在阅读一个名为在HTML 4中不赞成使用对象
元素。在HTML 4中,该元素仍然是该语言的一部分,建议使用浏览器来支持它(尽管实际上并非所有的浏览器都支持它,而且有些浏览器不支持它),但建议使用其他的东西(在这种情况下,<$ c
在HTML5 CR中,不使用单词deprecated。它使用术语,这意味着原则上完全不同但在实践中非常接近。在HTML5 CR中, applet
元素被声明为完全过时且不符合,并注意它不能被作者使用。然而,HTML5包含下的实施要求。而HTML5 指定普通浏览器必须(不只是应该)支持它。
HTML 4概念弃用与HTML5 过时的概念正在验证中:当使用Transitional DTD时,在接受HTML 4 DTD验证时,接受 applet
(但在针对严格DTD进行验证时将其标记为错误);在HTML5验证中, applet
被报告为错误。
不应将W3school用作任何类型的权限或引用,请参阅
I was reading through a website named w3schools and was taking the HTML5 lesson. There I saw a number of deprecated tags in HTML5 that were before accepted by HTML4. One of its tag were <applet>
! So are now applets of no use?
You can see it here: HTML5 New Elements(at the end)or here:
Applets (as applications written in Java and intended to run inside a browser) are not deprecated in any way in HTML specifications or drafts. There is decreasing interest in them, due to many other alternatives being available, but that’s a different issue.
The applet
element was declared deprecated in HTML 4, in favor of the object
element. In HTML 4, deprecation means that element is still part of the language, browsers are recommended to support it (though in practice, not all browsers support it, and some browsers could not support it), but there is a recommendation to use something else (in this case, object
) instead of it.
In HTML5 CR, the word "deprecated" is not used. It uses the term "obsolete", which means in principle something quite different but comes very close in practice. In HTML5 CR, the applet
element is declared "entirely obsolete and non-conforming", with the note that it "must not be used by authors". Yet, HTML5 contains a definition of applet
under "Requirements for implementations". And HTML5 conformance requirements specify that normal browsers must (not just should) support it.
One of the few real differences between the HTML 4 concept "deprecated" and the HTML5 concept "obsolete" is in validation: when validating against an HTML 4 DTD, applet
is accepted when the Transitional DTD is used (but flagged as an error when validating against the Strict DTD); in HTML5 validation, applet
is reported as an error.
P.S. W3schools should not be used as any kind of authority or reference, see http://w3fools.com
这篇关于小程序现在是否被弃用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!