Why Do YouTube Video Embeds Screw Up My Code?

by Teresa Valdez Klein on December 26, 2006

I’ve become pretty anal about making sure my HTML validates. So when something throws my code out of alignment, it irritates me.

As many people have mentioned before, clean code is one of the top reasons why blogs do better than traditional websites in the great race to the top of the search engine results page. When a search engine crawls your blog, it will note whether or not all your code elements were easy to understand. That counts both for search engine rankings and for the content that shows up in search results.

I recently checked the code on my personal blog, only to find 18 errors. Almost all of them were due to the three embedded YouTube videos on my blog’s front page. I don’t understand why so many cool services produce code that ticks off the W3 code validator. I don’t want to have to choose between incorporating cool elements like embedded YouTube videos and clean code.

If you’re starting a service that caters to bloggers or relies on bloggers to spread the word, pretty please with sugar on top make sure your widgets don’t mess up my code.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netscape
  • StumbleUpon
  • TailRank
  • NewsVine
  • Reddit

{ 2 comments… read them below or add one }

1 steven e. streight aka vaspers the grate 12.27.06 at 11:06 am

w3c validation is over-rated. I wouldn’t worry about it. My Vaspers blog has hundreds of invalid codings, but mostly “&” instead of “and” in posts. Yet I still do pretty okay. Search the word “blogocombat” and see me rule. heh

2 Joep Bos 03.10.07 at 5:34 am

That’s not a very nice reason why w3c should be overrated according to your opinion. There’s absolutely no problem with using the & symbol on your website, but the & is a special character which is used to produce “strange” characters like ë &copy > < etcetera. The & sign itself has such a description too which should be used instead. That’s the & .

Good luck making your weblog even more compatible and rule even more ;)

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <p> <strike> <strong>

Sponsored links

advertise here