How To Declare DOCTYPE on Your Website or Blog?


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.


  1. jessica
    Really nice information here about by choosing with the headlines. We want to make the readers whether it is relevant for their searches or not. They will decide by looking at the headline itself. I agree with your points but i can't understand what's logic behind by including with the number? Why most of the marketers will suggest that one? Is there any important factor within that please convey me.....
    School web design uk
    • BloggerSpice
      This is really awesome. People love to read headline that start with number. And this is very scientific that people always wants to know focus on main point, rather spending lots of time on longer article.
  2. farhaan khan
    bhai ye mera web site hai ispe bahut kaam kar raha hu par google ranke 0 hai koi idia do
  1. To insert a code use <i rel="pre">code_here</i>
  2. To insert a quote use <b rel="quote">your_qoute</b>
  3. To insert a picture use <i rel="image">url_image_here</i>
Go Up