Thoughts, rants and commentary from a husband, father of five and professional web geek

Posting YouTube videos to Wordpress in valid XHTML

Posted on June 26th, 2008 in Geek Stuff, Web Development | No Comments »

I realized in my quest to build a new theme for my blog that as I did validation testing on the markup that it didn’t validate (against the XHTML 1 Strict DTD - because I am a little Geek OCD when it comes to my markup). After a bit of inspection I realized that it was the stupid YouTube code that I copied from their site that was throwing off my validation.

Apparently YouTube thinks that everyone that puts their code into a site writes their markup under the transitional DTD. How stupid is that? A la:

<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/Rw8gE3lnpLQ&hl=en"></param>
<embed src="http://www.youtube.com/v/Rw8gE3lnpLQ&hl=en" type="application/x-shockwave-flash" width="425" height="344"></embed>
</object>

Well I wasn’t about to be told that I cannot have valid XHTML in my code. After all, I took the time to make sure the core code was valid, why should I tolerate invalid markup injected into my code by YouTube or Wordpress or anyone? Exactly.

My solution? Simple. Google.

And Google, being the friend to me that is always has been, helped me right from the go. It took me Valid XHTML to Embed a YouTube Video. After reading some of the goodness on this tutorial I read the comments. And lo and behold, I ran across another tidbit of goodness that all bloggers that are into valid XHTML output should look at.

The Valid XHTML YouTube embed code generator - Online tool is totally awesome. It is fast, clean and reliable. I have already used it twice and will more than likely be using for every video embed I post until I want (bad enough) to write a Wordpress plugin. Until then, if you are at all interested in keeping your XHTML template standards compliant, hit this little converter up because it rocks.

And just so I can prove myself to not be a liar… remember that little YouTube generated code snippet above? This is how it comes out afterward:

<object type="application/x-shockwave-flash" style="width:425px; height:344px;" data="http://www.youtube.com/v/Rw8gE3lnpLQ">
<param name="movie" value="http://www.youtube.com/v/Rw8gE3lnpLQ" />
</object>
<div style="font-size: 0.8em">
<a href="http://www.tools4noobs.com/online_tools/youtube_xhtml/">Get your own valid XHTML YouTube embed code</a>
</div>

Yeah, I thought it was great too. Enjoy.

Back to top

Making navigation menus using CSS

Posted on June 25th, 2008 in CSS, Geek Stuff, Mark Up, Web Development | No Comments »

A recent Sitepoint article by Rachel Andrews, Director of edgeofmyseat.com, outlined some pretty Nifty Navigation Tricks Using CSS. Anyone that wants to learn to make some pretty cool tabbed, button or vertical bar navigation lists should give this article a read through. It is a pretty well written article and has a great deal of code that can be easily copied and pasted for your development pleasure.

For four pages it reads very fast. It is easy to follow and the examples are practical. I wish there were some working samples of the code, but still, it is a good teaching tool for those that have yet to dive into CSS based navigation lists (and you should get into it, as CSS is designed for such things).

For those that want a huge assortment of samples, code and really cool lessons, check out Stu Nicholls’ CSS Play. This site is an amazing reference for learning the art of cross-browser compatible CSS. There are menus, layouts and much more available to learn from and even use, in many cases without even a link back to him, though it is always a good idea to give credit where credit is due.

So if you are in need of a little CSS learning fix, hit these references up. You will enjoy them and, in the case of Stu Nicholls, may even make them part of your normal daily web development toolset.

Back to top

New blog theme - Dark Sky

Posted on June 16th, 2008 in Geek Stuff, This Blog, Web Development | No Comments »

As much as I loved my Chocolate Ocean theme that I developed a few months ago…

Chocolate Ocean theme by Robert Gonzalez

… I thought it was time for a change. So I changed.

My theme that is.
Continue reading »

Back to top