如何检查任何 Web 应用程序正在使用的 html 版本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11298305/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:23:56  来源:igfitidea点击:

How to check the html version any web application is using?

html

提问by M Sach

how can i check what html version my web application is using? I have complete code base but i am not sure where to check the html version? In jsp i do not see see anything related to html version.

如何检查我的 Web 应用程序使用的 html 版本?我有完整的代码库,但我不确定在哪里检查 html 版本?在jsp中,我看不到与html版本相关的任何内容。

EDIT:-On google . most of the stuff says , do the page source , the very first line tells the html version. When i do the same isee

编辑:-在谷歌上。大多数东西都说,做页面源代码,第一行告诉html版本。当我做同样的 isee

 <!doctype html>

Now i am not sure, what version of html ishould make out from above line?

现在我不确定,什么版本的 html 应该从上面的行中生成?

回答by Black Frog

Check the DOCTYPEdeclaration in the html file.

检查html 文件中的DOCTYPE声明。

HTML5

HTML5

<!DOCTYPE html>

HTML 4.01 Strict

HTML 4.01 严格

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">