You are currently browsing the category archive for the ‘XHTML’ category.

Long time since I could have more than a couple of hours at a stretch on the internet, since I had to move apartment right on New Years Eve .. talk about bad timing huh .. 😀

Following up on my last post about valid XHTML and CSS for WordPress blogs, I figured the only way this could be really “forced” is to make sure the blog admin is notified immediately when a post or what not mucks up the code ..

So I decided to start writing a plug-in that will automatically check the blog for valid code as soon as any new action is triggered. Right now the most important seem to be post publish, page publish, and perhaps comments .. if the plug-in were to check the validity everytime one of these happened, the code should stay valid if it were to start as such.

This is going to be my first WordPress Plug-in .. lets see how it goes .. if anyone does read this post .. Wish me luck 🙂

Lately I have been seeing this on the WordPress Support Forums, that many people have trouble with keeping their themes stick to how they should actually work. Reason, absolutely mashed up XHTML, and sometimes CSS issues. The latter is understandable, especially with the plethora of browsers people use, and all of them rendering the same code in different ways.

But the thing with XHTML is a completely different story. I am seeing tags not being closed, tags being closed in the wrong way, opening tag missing with end tag being present, and what not.

A simple run through the XHTML Validator is enough to give a standards compliant/caring person a heart ache. At this point, its not even about being web savvy or compliant, it just becomes a practical issue of making your website work the way you want it. This is where valid code assumes a practical use rather than trying to make you a computer genius or whatever.

Most of the WordPress themes available are more often than not valid for their respective DOCTYPE declaration. The problem is the code in the posts themselves. They use tags not formatted properly, or just completely in the wrong way with respect to the DOCTYPE of the page, and the result is you get a big Red Banner on the validator results informing you that the page is not valid.

The core code that WordPress spits out itself is valid (this is where the “Code is Poetry” part really stands out), but users include stuff in their post that is totally messed up, and then what they get is a page that looks totally opposite of how it should actually look like.

WordPress users should really take care of what they put in their post, if only every blog running WordPress would validate perfectly for the respective DOCTYPE, then the WordPress community would possibly be the largest group of internet users running beautiful websites and beautiful code as well. Now that would rock!!!:)

Categories

Visitors

  • 9,865 Views