twuffin Posted September 12, 2011 Share Posted September 12, 2011 Ok I am probably being a complete idiot but I cannot for the life of me work out how to put a you-tube video into a HTML 4.01 Strict doctype. I have tried using the object command but not sure I really understand it and can't seem to find simple, beginner's level information online. If I use HTML 4.01 strict it doesnt like the <iframe> tag and if i use HTML 4.01 transitional (which I want to avoid) it doesnt like the allowfullscreen command. Does anyone have any advice (except the you tube site which might as well be written in dutch) as to where I can find a simple explanation of how the <object> tag works? Any advice on how it works with youtube would be even better - I am at severe beginner's level having only really started building sites last week. page code is <div id="youtube"> <iframe src="http://www.youtube.com/embed/l3MHt5vHLSU" frameborder="0" allowfullscreen style="width: 380px; height: 210px" id="I1" name="I1"></iframe> <p> Me playing 'Top of the Morning' by Mike Oldfield for a school talent show</p> </div> The CSS is: #youtube{ width: 380px; margin-left: auto; margin-right: auto; margin-top: 20px; text-align: center; } Thanks in advance - apologies for being such a noob lol Link to comment https://forums.phpfreaks.com/topic/246949-html-401-strict-youtube-video/ Share on other sites More sharing options...
Muddy_Funster Posted September 12, 2011 Share Posted September 12, 2011 OK, have found <object> code that works and validates. The problem was that everywhere was saying that the object type should be application/shockwave-x, which when used does validate, but shows nothing on the page. I played about with the type expression and found this one to do the job without needing any additional plugins for firefox: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>video test</title> </head> <body> <div id="youtube"> <object type="video/webm" data="http://www.youtube.com/embed/l3MHt5vHLSU" width="200" height="200"> <param name="filename" value ="http://www.youtube.com/embed/l3MHt5vHLSU" /> </object> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/246949-html-401-strict-youtube-video/#findComment-1268260 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.