Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML HTML Objects Embedded Elements

unable to embed code

unable to upload other videos on youtube to my website other than the examples given in the video lesson. This is what i typed, please tell me the corrections

<!doctype html>
<html lang="en">
<head>
<title> first page </title>
<meta charset="utf-8">
</head>

<body>
 <object width="960" height="720">
 <param name="movie" value="//www.youtube.com/v/gSPAargq4LI?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/gSPAargq4LI?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="960" height="720" allowscriptaccess="always" allowfullscreen="true"></embed>
 </object>
<a href="another-page.html"> My Link</a>
<p> this is the first page </p>

</body>
</html>

http://www.youtube.com/watch?v=gSPAargq4LI

this is the link of the video which i have tried

this is what i typed, plz make the changes u wish to <!doctype html> <html lang="en"> <head> <title> first page </title> <meta charset="utf-8"> </head>

<body> <object width="960" height="720"> <param name="movie"value="http://www.youtube.com/v/gSPAargq4LI?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/gSPAargq4LI?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="960" height="720" allowscriptaccess="always" allowfullscreen="true"></embed> </object> <a href="another-page.html"> My Link</a> <p> this is the first page </p>

</body> </html>

did u get my code, plz reply if u got my question

5 Answers

this is what i kept

<!doctype html>
<html lang="en">
<head>
<title> first page </title>
<meta charset="utf-8">
</head>

<body>
 <object width="960" height="720">
 <param name="movie"value="http://www.youtube.com/v/gSPAargq4LI?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/gSPAargq4LI?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="960" height="720" allowscriptaccess="always" allowfullscreen="true"></embed>
 </object>
<a href="another-page.html"> My Link</a>
<p> this is the first page </p>

</body>
</html>
Andrew McCormick
Andrew McCormick
17,729 Points

you only changed it in one place. You have to change it again in the embed tag

Andrew McCormick
Andrew McCormick
17,729 Points
 <embed src="//www.youtube.com/v/gSPAargq4LI?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="960" height="720" allowscriptaccess="always" allowfullscreen="true"></embed>

should be

 <embed src="http://www.youtube.com/v/gSPAargq4LI?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="960" height="720" allowscriptaccess="always" allowfullscreen="true"></embed>
Andrew McCormick
Andrew McCormick
17,729 Points

hmm.. what you typed seems to work for me. Screenshot: image

in what browser is it

Andrew McCormick
Andrew McCormick
17,729 Points

ok. I take that back it ran in Workspaces on here, but not when I put into an html file. modify where you have (both places): value="//www.youtube.com ... to value="http://www.youtube.com ...

i did not get it even i replaced with http://www.youtube.com, plz let me know. I am really struck here

i did not get it even if i place http://www.youtube.com

Andrew McCormick
Andrew McCormick
17,729 Points

can you post your code after those changes. (remember to put three tildes -or backticks- ( ``` ) on the line before and after your code to post as code (I edited your original post for correct formatting).

    i typed it as 

<param name="movie"value="http://www.youtube.com/v/gSPAargq4LI?hl=en_US&amp;version=3"></param>

i got it man thank you very much, sorry i was typing at the top, now i typed at embed