How to Apply HTML 5 Validation:

The <!DOCTYPE> declaration is not an HTML tag. It’s an instruction to the web browser what HTML version the page should be written in.


<!DOCTYPE html> goes at the top of every HTML5 page.


<!DOCTYPE html> means “this page is written in HTML5” as opposed to, say HTML 4.01. Here’s an example of one common type of XHTML:

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



XHTML template structure:

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


<html xmlns="">



        <title>An XHTML 1.0 Strict standard template</title>

        <meta http-equiv="content-type"

        content="text/html;charset=utf-8" />



     <p>… Your HTML content here …</p>





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



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

XHTML 1.0 Strict:

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

Tip: Don’t forget to add the <!DOCTYPE> declaration to your HTML documents, so that the browser knows what type of document to expect. Otherwise you can face some problem with your website.