How to check HTML version of any website

To check 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 any other code.

You should see something similar to this but you will be interested in the first line only. This looks like HTML5 Doctype declaration.

Check HTML 5 Doctype version

With the entry of HTML5 the Doctype declaration is much simpler and you can spot it in a second.

<!DOCTYPE html>

Check HTML 4 Doctype version

HTML 4 has lots of Doctype declarations depending of the subversion it is used.

# HTML 4.01 Strict

# HTML 4.01 Transitional
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

# HTML 4.01 Frameset
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "">

And this 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.

# XHTML 1.0 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">

# XHTML 1.0 Transitional
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

# XHTML 1.0 Frameset
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "">

# XHTML 1.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

Check HTML version via W3C

W3 Consortium has a free HTML free 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.

Leave a Reply

Your email address will not be published. Required fields are marked *