Saturday, 19 December 2009

How To Validate Embedded You Tube Videos

For many of us, Youtube has been a gold mine for getting videos for our websites and blogs.

And Youtube has been very helpful by providing an embed code
All you have to do is grab the embed code of the relevant Youtube video and paste it in the relevant area of your sites or blogs html code and Hey presto, you have video on your site

Problem is it causes problems with your website's validation

What is website validation and why does this matter

Standardization

The code for websites, HTML or XHTML, must follow a certain standard which is set by W3 consortium. Your website code needs to be compliant with this standard.
You could argue that some browsers can correct for these errors but not all can. What you want is for your HTML code to be universally understood and interpretable

Search Engine Optimization

We all know that backlinks are a major component of search engine optimization. But on page factors play an important role. If the search engine spiders have difficulty interpreting part of your code, it could have major implications for how they handle the relevance of the related content

Page Loading Speed

Poor HTML coding could adversely affect the speed with which your website loads. And no-one hangs around waiting for a slow page to load. Also there are rumours that Google will soon update it's algorithm to include speed of loading as a factor. Now while this rumour is not verified, I think doing everything that you can to help your webpage or blog's performance in the search engines is not a bad idea.

So enough on validation and why you should validate your site. We will go into more details of this in another post

For now, back to the Youtube issue.

If you embed Youtube videos as is on your webpages, the code just does not validate

To check for the validity of your code use the W3 schools HTML validator
Just type in the URL of the page that contains a Youtube video and the result speaks volumes

But using Youtube videos is great. It has certainly helped increase the traffic to some of my websites

So how can you embed Youtube videos into your websites without corrupting your code

I use a free web based script and it works a treat
The script is at flash embed code validifier
Works for other embed sites as well

Till next time

1 comment:

business startup loans said...

Nice Resource Sharing, It can easily convert Flash embed code into valid XHTML. Thats cool..