Wednesday, 8 May 2013

W3C validation for blogger XHTML blog templates




Hello Readers, in this post we will learn how to minimize Blogger XHTML errors to validate it for W3C (World Wide Web Consortium). Unziptech has always shared useful articles for blogging and SEO optimization tips. This post focuses on the same category and a very important topic W3c validation. You might have not noticed this thing yet, but all the blogger templates have some or many XHTML errors which may lead to slower page loads and crawl errors on your blog. There is one more thing that you should know about these errors that completely removing these errors is nearly impossible because of some server side coding in the templates. So we will learn how to minimize these errors in this article.

W3C validation XHTML blogger template

As I told that these errors may lead to Crawl errors which have adverse effect on your site's SEO optimization. Crawl errors will trouble search engine bots to crawl your site properly. Before starting the tutorial I recommend you to first take a look at the count of errors and warnings on your blog by entering your blog URL into W3C validator webpage. Now you know the exact count of errors and warnings, we shall learn to fix them now.

How to validate blogger blog XHTML templates for W3C

Fix Document Type Definition:

The first thing you should do is to fix the document type definition, generally the first two lines of the blog template. Follow these steps:

  • Login in to your blogger template.
  • Take a backup of your Blogger blog to avoid any loss.
  • Click on edit template and find the following lines of code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  • Replace these lines by the following code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  • Save your template and you are done.

You have just fixed your blog's DTD. If your blog's template doesn't have the above code let it remain unchanged because it may increase the errors count.

Fix your Images:

I have written a complete article for this topic. Images without alt tag are useless for your blog and they won't help you in SEO. They may also create XHTML errors or warnings in your blog. So start optimizing your blog images to minimize these errors/warnings and for better SEO optimization.

Remove hyperlinks from comments:

I know this is kind of a big task and being a blogger user we don't have facility to edit and remove hyperlinks from the comments. But still you can minimize the count of comments that includes spam hyperlinks by marking them spam from your blogger dashboard. Hyperlinks create XHTML errors in the blog templates.

Avoid using Hierarchal Archives:

I have seen many blog authors offering hierarchal archives of their blog posts which is a bad SEO optimization practice as well as it increases the XHTML errors. Your best bet is to display a simple drop-down list or removing the archives widget.

Remove quick edit:

You might have noticed that Blogger gives you a facility to edit your widgets right from your blog if you are signed in. It displays a quick edit icon at the bottom of every widget you add to your blog. It makes your work easy but it is one of the biggest reasons of the XHTML errors. You can remove the following code from your blog for fixing this problem:
<b:include data='post' name='postQuickEdit'/> 
or 
<b:include name='quickedit'/>
This code will be occurring multiple times on your blog depending upon the number of widgets you have used. Remember remove this code after every new widget you insert into your blog.

After fixing all the above mentioned errors, validate your blog once again. I am sure you have minimized the number of errors and warnings. If you have any problem regarding any step mentioned in this article, you can comment here. I will be glad to help you.

Don't forget to visit our Blogging and SEO tips section for more cool tips and tutorials that will surely help you improving your blogging experience. 

If you like my work; you can show your regards by hitting Facebook like button, following us on Google+ or Twitter, stumbling our posts on stumble upon or giving us a link back via the links below. Stay tuned for more tech updates.

Do you like this post? Please link back to this article by copying one of the codes below.

URL: HTML link code: BB link code:
author pic
Author: Mohammad Zafar Ahmad
Zafar Ahmad is PHP/Java Developer and a Passionate Blogger. He likes to write about Blogging tips, SEO tips, Blogger Widgets, Smart phones, Tablets and Online Earnings. You can find him on Facebook, Twitter or Google+

1 comment:

  1. Yes you need to re-edit all your posts to add alt tags,,I edited 50+ posts on my blog to add alt and title tags..

    ReplyDelete