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

Jeff Mathis
Jeff Mathis
3,935 Points

Embed Videos from youtube.

followed the intructions on the video in my track about embed videos from youtube. I copy and pasted from youtube and it shows up blank in my page. It shows the space where it would be but its still blank? I used old embed code as instructed and it is not working. anybody else have this issue?

3 Answers

Ryan Boone
Ryan Boone
26,518 Points

Make sure you're including the http:// at the beginning of the video link.

James Barnett
James Barnett
39,199 Points

I'm going to take a guess here you are trying to embed a YouTube video in an html file on your computer that doesn't a web server.

If that's the case ...

Protocol-less URLs don't work without a web server, so in that case just add http: in front of the URL.


> The main caveat to keep in mind when using the protocol-less reference is that it will fail on pages loaded via file:/// (i.e. HTML pages you load directly from disk to your browser). So, do be sure to include the http: protocol in the URL if you happen to be developing without a web server at all, but don’t worry about omitting it otherwise.

source: http://encosia.com/3-reasons-why-you-should-let-google-host-jquery-for-you/

Jeff Mathis
Jeff Mathis
3,935 Points

thanks man it worked !