开发者

Does my HTML4 site support HTML5?

开发者 https://www.devze.com 2023-03-21 04:14 出处:网络
Regarding a site I built a few years back, I\'ve been asked \"Does the site support HTML5?\" The site was built a few years back using standard HTML.

Regarding a site I built a few years back, I've been asked "Does the site support HTML5?"

The site was built a few years back using standard HTML.

Wh开发者_JS百科at is the correct response to a question like this? I thought it was browsers which either support HTML5 or not as they render the script?


This is not really an appropriate question.

But your site will continue to work in browsers that support HTML4 and the doctype you are using. This support is likely to continue for quite some time.

You can easily start to move your site towards HTML5 by adding the HTML5 doctype:

<!DOCTYPE html>

The HTML5 doctype is backwards compatible.

You can read some more here: How to write backwards compatible HTML5?


If your site is valid "HTML4" - there are many flavors - your site will be future proof, even if it is not written in HTML5.

You can test compatibility with the W3C Markup Validation Service


Short answer: Yes - IMO this question is more about will browsers continue to support the HTML4?

However, HTML5 does begin to deprecate some elements / attributes present in HTML 4 and I can imagine a scenario in the future where browsers may begin to also.


Document type support varies betweeen browsers.

You should check the differences between HTML5 specs and your site doctype specs to see if the two are compatible, to mantain it standards compilant.

Anyway the problem is the contrary, a website using new HTML5 features may not be compatible with older browsers not supporting them.

0

精彩评论

暂无评论...
验证码 换一张
取 消