Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Objects Embedded Elements

Can't get my video to work in Embeded Elements

The Video I found on you tube won't appear or play in my html (index.html file.) When I refresh page I see a small black box appear for like a millesecond then just a blank page. Anyone know what I am doing wrong? Here's my code:

<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>My Page</title> </head> <body>

<object>

        <param name="movie" value="//www.youtube.com/v/_OBlgSz8sSM?hl=en_US&   amp;version=3"></param>
        <param name="allowFullScreen" value="true"></param>
        <param name="allowscriptaccess" value="always"></param>
        <embed src="//www.youtube.com/v/_OBlgSz8sSM?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>    

</object>

</body>

</html>

5 Answers

you need to put http: inside your src. It shoul look like this: <embed src="http://www.youtube.com/v/_OBlgSz8sSM?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>

? I tried it in my embed src is that what you mean? You state it should look like this..but I don't see your example.

Example below: <embed src="http://www.youtube.com/v/_OBlgSz8sSM?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>

I tried this but didn't work either. I am following what the video "Embeded Elements" but it doesn't tell me I need to do that...so totally confused

I am pretty sure that the link is the problem. Rename your value and embed src from //www.youtube.... to http://www.youtube... just put http: before the link

"""html <embed src="htp://www.youtube.com/v/_OBlgSz8sSM?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>"""

"""html <embed src="htp://www.youtube.com/v/_OBlgSz8sSM?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>"""

Hi Nemanja.....Yes...got it to work..Thank you!!! I misplaced colon on http: I need to have a better eye.