What are the pitfalls when validating your website?
After spending many nights on the macbook over the past month working on a layout for my new blog I finally got around to getting my site launched properly.
I’ve absolutely loved working with wordpress recently as anyone who has seen existem.com or affiliates4u.tv will know, so it seemed about right that I run my own site from it too.
Now I’ve been through the validation process with most of our sites as I feel it’s important to get your code as valid as possible. However, I also feel there’s a limit to what you can do sometimes, and it’s usually due to some third party.
Problem 1
Third-party plugins and widgets such as twitter can screw up your validation
I found this problem via validation and it was fairly easy to fix. Because twitter wasn’t printing the code to the page using the recommended unordered list snippet, and hence it wasn’t validating as there were no child tags. I got round this by making a copy of the javascript file and putting the unordered list tags in there.
Problem 2
If your wordpress site uses lots of plugins there’s a chance they will invalidate your site
I don’t want to point any fingers here as I love the fact there are amazing plugins out there for free. However, some will invalidate your code. I’m not a php guy so I don’t really like picking stuff apart too much so I have to live with this problem.
Problem 3
Sites developed that put the user’s content at the core often result in invalid code.
I think this is a real sticking point. If you’re aggregating a lot of user provided content (i.e forum, blog feeds) valid code is not really in your control. If user’s are in control of what html they can add then it’s fair to say the code probably won’t ever be 100% valid.
So what does that mean for code validation?
I think it’s important to get your own code validating. Make sure that what you write is solid and if you’re like me and you use third party plugins, try and choose up-to-date ones or adapt them if you know how.
Validation is important, but what’s more important is that your site is usable, structured and well thought out. Lets face it, most users won’t be checking your xhtml/css validation.
P.S – This site validates in most places. The css has elements of webkit within it so doesn’t validate right now!