HTML Validation: Choosing a DOCTYPE

Posted by tagicon_admin | August 23, 2015 | in : CSS3, HTML

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:

 

 

XHTML template structure:

 

Transitional:

 Frameset: 

XHTML 1.0 Strict:

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.

Related Posts

Leave a Reply