Results 1 to 17 of 17
Thread: YouTube XHTML Strict ?
Dec 2, 2006, 16:41 #1
YouTube XHTML Strict ?
Is it possible to insert a YouTube movie in a valid XHTML 1.0 Strict page ? Iīve tried, but if it validates it doesnīt work, any ideas ?
Dec 2, 2006, 18:42 #2
No it won't validate - this is as close as you can get for something that works cross browser:
<object type="application/x-shockwave-flash" data="http://www.youtube.com/your-video" width="425" height="350"><param name="movie" value="http://www.youtube.com/your-video" /></object>
Dec 3, 2006, 02:46 #3
- Join Date
- Jun 2004
- "Then I figure the most good good guy will win."
- 0 Post(s)
- 0 Thread(s)
Dec 3, 2006, 07:04 #4
I always use SWFobject for Flash content, but for some odd reason it wonīt work with youtube.
Iīll keep searching.
Dec 3, 2006, 09:07 #5
Hello, Satay method?
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/your_video" width="425" height="350" > <param name="movie" value="http://www.youtube.com/v/your_video" /> <param name="wmode" value="transparent" /> </object>
Silly question, but you do realize your object has to go inside a block level element like a DIV or P, right?
Dec 3, 2006, 10:42 #6Originally Posted by deathshadow
Two things I prefer about the method I suggested (not to your suggestion DS which is essentially the same - just generally speaking):
1. The code is uncomplicated and all "in the page"
2. The code works across browsers
3. The code requires no JS or additional Flash movies
4. Although the code does not validate, I insert the code aware of this and that I am making a compromise and it doesn't bother me that the page doesn't validate - this is the browser maker's fault, not mine.
Being hell bent on validation, even when it is not practical, reminds me of those that try to use CSS and lists to replace tables for tabular data display - you are not more of a web developer if you choose a more complicated method - you are just a less practical one.
Dec 3, 2006, 11:13 #7Originally Posted by John Wozniak
Remember, object is considered an inline - raw inlines are invalid XHTML... all inlines MUST go inside a block level to validate.
You leave it without a container, you get the classic 'inline must be inside a block level like H1, H2, DIV, etc'.
Dec 3, 2006, 12:53 #8Originally Posted by deathshadow
I actually don't have any of these videos in any of my "real" pages so I am just winging it (hence the standalone code) - the point I was making about validation is that sometimes people get so set on it that it impedes them from thinking practically.
In a "real" page the video would likely be contained be a block level element so this would have never come up.
Dec 3, 2006, 13:18 #9
Got it !
Adobeīs own solution validates XHTML Strict 1.0 and removes the "click to activate" in IE. Works in all browsers according to Browsercam, yes, even IE 4 and Netscape 4.
Example code for YouTube:
Dec 3, 2006, 13:35 #10Originally Posted by wii
If not, brings me to the inevitable question - what browser? (and if Opera, did you install the user CSS flashblock?)
Dec 3, 2006, 13:40 #11
I just edited my post - click to activate only applies for IE, but the code above fixes that.
Dec 3, 2006, 14:07 #12Originally Posted by wii
But then, I don't usually use flash on websites - and haven't used IE to actually browse in... four years? (strictly compat testing at this point)
Dec 3, 2006, 14:47 #13
Dec 3, 2006, 14:48 #14Originally Posted by wii
What is most irksome about all the hoops that you (meaning anyone) must jump through for IE, is that in regards to this particular issue, if MS didn't create and utilize ActiveX we would be able to use the same, super simple code across the board - one can dream! One more strike against MS and the effect their business practices have on our work.
Most important thing is that you found a solution that you are comfortable with - sounds like you got that.
All the best,
Dec 3, 2006, 14:52 #15
Yeah, itīs annoying what happened to Microsoft and IE, but Iīm not interested in politics, I always do whatīs best for my users, and since most people on my sites and forums use IE, I have to fix it, I myself always use Firefox.
In any case Adobe's solution to this is perfect.
Dec 3, 2006, 14:58 #16Originally Posted by wii
Dec 5, 2006, 03:26 #17
I agree John, thanks for your comments.