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 Video and Audio (Retired) Media Basics The Video Element

Emma Schwartz
Emma Schwartz
4,019 Points

How do you put two videos on a website in HTML?

When I put two videos on my site, I saved it, then I saw only my first video.

Garrett Sanderson
Garrett Sanderson
12,735 Points

Can you post your code so we can see what might be the problem.

1 Answer

Satnam Singh
Satnam Singh
7,194 Points

If you can show me your code or what you've done then I can help you to fix your code.

Though here's some codes which you can try out.

CSS :

video {
    display: block;
    margin-bottom: 1em;
}

HTML :

<video width="400" controls>
  <source src="mov_bbb.mp4" type="video/mp4">
  <source src="mov_bbb.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>

<video width="400" controls>
  <source src="mov_bbb.mp4" type="video/mp4">
  <source src="mov_bbb.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>

Don't forget to change the src attribute value with your video url.

Hope this helps