是否可以将HTML5元素与旧的HTML4一起使用? [英] Is it possible to use HTML5 elements with old HTML4?

查看:120
本文介绍了是否可以将HTML5元素与旧的HTML4一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网页中使用了video元素,但是DOCTYPE是HTML4.

I've used the video element in my web page but the DOCTYPE is HTML4.

然后,我也可以在HTML5中使用frameset.

Then, I can use frameset in HTML5 also.

为什么对标签的使用没有限制?

Why there is no restriction on tag usage?

推荐答案

HTML旨在容忍错误.使用特定的文档类型不会使浏览器拒绝发布该文档类型时不存在的标签.

HTML is designed to be tolerant of errors. Using a particular doctype won’t make browsers reject tags that weren’t around when that doctype was published.

这就是为什么当前HTML文档类型仅为<!DOCTYPE html>,即未版本控制的原因.它更准确地将HTML反映为不断发展的标准.

This is why the current HTML doctype is just <!DOCTYPE html>, i.e. unversioned. It more accurately reflects HTML as an ever-evolving standard.

这篇关于是否可以将HTML5元素与旧的HTML4一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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