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".
Chosen solution
If the page is HTML5 then you should see this DOCTYPE in the Page Source: <!DOCTYPE html>
Read this answer in context 👍 4All Replies (4)
Chosen Solution
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"."'
Modified
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">