Bing and XHTML
It’s official. Microsoft loves XHTML compliant web pages! Well formed documents can be consistently displayed, searched, indexed, sorted and so on. Microsoft even entertained the idea of enforcing XHTML compliance in IE8. I guess it stands to reason that Bing will also prefer well formed web pages. If Bing becomes popular, it may be the catalyst used to sway developers to create well-formed XHTML web pages.
I therefore set out on a wonderful adventure to remove all XHTML errors and warnings from one of my sites.The finished error free page can be found at http://beginnerchess.org if anyone is interested.
Interestingly, I found three problems that would affect many people using Wirdoress 2.8 and above.
- Google adsense code snippets actually break wordpress. Wordpress converts the closing CDATA bracket to > (not >). To fix, remove the CDATA section and replace with comment tags. eg:

- Also, the wordpress 2.8 search facility is not well formed. If you can be bothered, modify wp-includes/general-templates.php and remove any reference to role=”search”.
- Finally, make sure your theme has <ul> and </ul> tags around any calls to dynamic_sidebar (normally found in sidebar.php or functions.php files).
Also note that embedded flash files are not XHTML complient. There have been attempts to display flash using conforming tags, but I’ve found them not be reliable. Stick with non-compliant code for now.
To test your web page, visit http://validator.w3.org/

















