How To Declare DOCTYPE on Your Website or Blog?

How to declare DOCTYPE declaration in Blogger Template?

Doctype declaration is very important for a website, because search engine can get additional information about Webpage’s HTML version. But many webmaster think declaration is an HTML tag. But indeed it is an instruction to the web browser about what version of HTML the page is written in. And it must be declare before <html> tag.

Types of HTML That works with DOCTYPE

We know there are different types of HTML version released and DOCTYPE declaration varying on HTML. However DOCTYPE declaration is necessary for web browsers thus it can render the content correctly. You can see below different DOCTYPE declaration codes according to HTML version.

HTML 5 = <!DOCTYPE html>
HTML 4.01 Strict = <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “”>
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” “”>
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” “”>

All DOCTYPE declaration codes are changing with HTML version. And except HTML 5 version other HTML versions specified by DTD for better browsers rendering.

How to declare DOCTYPE declaration in Blogger Template?

I know now you are trying to declare DOCTYPE in your Blogger template. But this is depending on your HTML written version. Most of the Blogger template developers are using HTML 5 version code for DOCTYPE declaration. Even I am using HTML 5 version for DOCTYPE declaration. For declaring DOCTYPE please follow the below tutorials.

Step 1 Log in to your Blogger Account and Go to your Blogger Dashboard

Step 2 Click on -> Template -> Edit HTML-> 

Step 3 Now locate <html…….

Step 4 Above the opening HTML add the DOCTYPE code for declaration. E.g. the script will be like below-

<!DOCTYPE html>
<HTML dir='ltr' lang='en' xmlns='' xmlns:b='' xmlns:data=''

Step 5 Now click Save template button.

That’s it now your website will be understandable by web browsers and it will performs great on the web.

If you are using different Web platform then just locate the <html> and just you have to put the DOCTYPE code above opening <html>. This is really easy process. And for better and smooth performance on web browsers you must declare DOCTYPE. Happy Blogging.
Go Up