Main reasons for Invalid XHTML pages in blogs
Watching your blog pass all the validations like html, xhtml, css etc. is actually satisfying for everybody. W3Schools validator tool is the most popular one used for the purpose. Many Blogger users should have found that however hard they try there will still be errors if the strict check is enabled, Why?
1. For Blogspot : If you know your page well and look at the errors shown you will come to the sad conclusion that you will NEVER be able to make your page valid..It’s because even if write your posts and template in valid xhtml the Blogger parts – Navbar, iFrames and attributes used with them are not properly xhtml formatted. You can do nothing about them.
There are some common errors among these especially if you come from an HTML background. Many of the attributes used in HTML are invalid if we use xhtml strict mode.
2. For all : If you are a blogger or a web page developer there can be errors in your document. Of course if you are only starting you may not be able to resolve many of this. So following are the main errors and the suggestions to rectify them.
General
Always use small letter for all tags and attributes. ie use <img src=” ” alt=” ” /> instead of <IMG arc=” ” ALT=” ” />
<META>
Use small letters as well as close the tags your meta tags should read
<meta name=”name” content=”content” />
<a href=”"></a>
Always use title attribute for <a tag <a href=”http://sample.com” title=”my title”>Link Text</a>
<img>
Empty tags are not allowed in XHTML. so you need to use <br /> for <br>, <hr /> for <hr>, <img /> for <img>
width=..,height=..,
It is always better to use <style=”width:xx px; …”> The usage is as follows
<img src=”PATH” width=”xx” border=”mm”>>. for this try using <img src=”PATH” style=”border: toppx rightpx bottompx leftpx; margin: toppx rightpx bottompx leftpx; width:xxpx;” alt=”Alternate text” /> (you can use negetive numbers for margin border etc.. and also px can be changed to cm centimeter, in inch etc..)
alt=”TEXT”
Never forget to put alternate text, the text shown in image disabled browsers. (always use some text that best describes you image)
<sctipt language=”JavaScript”>
Use <script type=”text/javascript(VBscript)“>
<style>
be sure you use <style type=”text/css”>
<u>
This tag for underlining can’t be used (it works still) use <font style=”text-decoration:underline;”>
Most common errors – from W3Schools site
not using </li> or other closing tags, usage of empty tags like <br>, not using alt in images etc…
So check your web page for errors and go care fully through the result page so that next time you edit your page the error wont repeat.
Some related articles you may like :
- Save web pages as PDF and save to your desktop for free
Most of us browse through numerous web pages and save them if we find them interesting. When I am downloading the entire site I... - Unexpected error on your webpage home – function.main failed to open stream
Sometimes cryptic error messages may bug your wordpress system. Here is one such error I encountered and how I overcame it.... - Adsense temporarily down
The Google Adsense web site is down temporarily. I went to the login page and found and Error page stating that Adsense is temporarily down.... - What to do when you can’t log-in to blogger
Some times Blogger will show a “server was encountering a problem” message when you try to login and will give you an error code and... - How to save copy righted Images from Flickr
This is a trick you can use to save images from Flickr. If you right clicked and used Save Image As and see the image... - Start a personal or group web site for free at Google sites
Google Sites” is now available for free public registration and use. With Google sites you can start a personal or group managed web site. You...