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

Brian Zekoll
Brian Zekoll
2,660 Points

Video doesn't want to view on my page

I go into my workspace and enter the video code exactly the same as presented in the video except I use a youtube link. I preview it which brings me to my page and I refresh it. On the bottom of the video it says Source invalid even though I copy and paste the url from the youtube video and enter it where it belongs. Any ideas?

Jake Lundberg
Jake Lundberg
13,965 Points

Can you please post your code so we can try to help you with your problem?

Brian Zekoll
Brian Zekoll
2,660 Points

I post the code but it when I save the comment it expresses the code. I'm not sure how to post my code so you can see it

Jake Lundberg
Jake Lundberg
13,965 Points

See the "Markdown Cheatsheet" link at the bottom of the page. It explains how to post your code.

Brian Zekoll
Brian Zekoll
2,660 Points
<video controls>
<source src="https://www.youtube.com/watch?v=Z03-bdaWeF8" type="video/mp4" />
</video>

2 Answers

I would love to help. What lesson is this in so I can look at what they do in the actual lesson and not give you something I would do (which might work but be something different than in the course).

Brian Zekoll
Brian Zekoll
2,660 Points

Its HTML Video and Audio and here's the link to the actual lesson where it introduces it.

https://teamtreehouse.com/library/html-video-and-audio/media-basics/the-video-element

(I'm new so I'm not sure if you have to complete the first lesson in the series or not but the lesson is "The Video Element" in the series)

Okay I will take a different approach with my answer. I have embedded youtube video's many times.

Go to the video that you want to include in your site. Hit the share button. It will give you several options one of which is to embed the video. Copy and paste the code into the element where you want the video displayed. Preview the page.