HTML5
How to know if the page someone is browsing is HTML5?
For example, if I'm browsing php webpage then I right click on the page and "View Page Info", I get this: Type: "application/xhtml+xml".
I tried that on HTML5 webpage but I got the following: Type: "text/html".
すべての返信 (4)
選ばれた解決策
If the page is HTML5 then you should see this DOCTYPE in the Page Source: <!DOCTYPE html>
Right Click on the page and select View Page Source. Then at the very first line of HTML source code You can see its doc type.
HTML5 doc type and older version doc types are different.
HTML5 doc type is
< !DOCTYPE HTML >
Older HTML versions doc type is
< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
Thank you "cor-el", that was helpful.
"pmjcreations", I just read that the "html" is "case-sensitive": "In XHTML5 the DOCTYPE must be a case-sensitive match of the string "DOCTYPE html"."'
この投稿は sam6000 により
Simple HTML5 doc type is : < !DOCTYPE HTML >
Whereas older HTML doc type is :
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">