TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

HTML is now versionless... since 2011

1 点作者 INTPnerd超过 8 年前
I recently had an interesting conversation about the use of the HTML 4 transitional doctype, and was surprised to find out that it was no longer valid. I thought this website was the official &#x2F; final say on the matter, but apparently it is both outdated and &quot;just an informative reference&quot;, whatever that means: https:&#x2F;&#x2F;www.w3.org&#x2F;QA&#x2F;2002&#x2F;04&#x2F;valid-dtd-list.html<p>This is true despite the fact that the best validator I know of, https:&#x2F;&#x2F;validator.w3.org&#x2F;nu&#x2F;, agreed this was a valid doctype. But apparently that was a mistake as well, and they recently fixed it so it shows that doctype as an error.<p>So what does it mean for HTML to be versionless? Here is the best I can understand it. The doctype is not supposed to alter the way the browser behaves. Browsers should continue to support outdated elements, attributes, etc for backwards compatibility and to give the web time to catch up to the latest standards. Authors should stop using them. To the extent browser choose to support outdated stuff, they do so as a single version of HTML, the same way they support &quot;HTML 5&quot; stuff.<p>But if HTML is now versionless, why are we using the terms HTML 5.1 and 5.2?<p>References:<p>https:&#x2F;&#x2F;blog.whatwg.org&#x2F;html-is-the-new-html5<p>https:&#x2F;&#x2F;html.spec.whatwg.org&#x2F;multipage&#x2F;syntax.html#the-doctype<p>https:&#x2F;&#x2F;github.com&#x2F;validator&#x2F;validator&#x2F;issues&#x2F;408<p>https:&#x2F;&#x2F;github.com&#x2F;htacg&#x2F;tidy-html5&#x2F;issues&#x2F;466

暂无评论

暂无评论