To check the HTML version of a website or web application you can simply check the source code of the site (normally CTR+U ) and look at the Doctype on top of any other code.
You should see something similar to this but you will be interested in the first line only. This looks like an HTML5 Doctype declaration.
Check the HTML 5 Doctype version
With the entry of HTML5, the Doctype declaration is much simpler and you can spot it in a second.
1 |
<!DOCTYPE html> |
Check the HTML 4 Doctype version
HTML 4 has lots of Doctype declarations depending on the subversion it is used.
1 2 3 4 5 6 7 8 |
# HTML 4.01 Strict <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> # HTML 4.01 Transitional <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> # HTML 4.01 Frameset <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> |
And these are the XHTML Doctype versions
XHTML standard is a well-formed version of HTML and may therefore be parsed using standard XML parsers, unlike HTML, which requires a specific parser.
1 2 3 4 5 6 7 8 9 10 11 |
# XHTML 1.0 Strict <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> # XHTML 1.0 Transitional <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> # XHTML 1.0 Frameset <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> # XHTML 1.1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
Check the HTML version via W3C
W3 Consortium has a free HTML validation service that can tell you what HTML version uses a specific website.
There are also some extensions for Chrome and Firefox for real-time validation that can be used for this purpose.