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 Source Element

Dongyun Cho
Dongyun Cho
2,256 Points

why I cannot load the two same videos?

    <h1>HTML Video and Audio</h1>

    <div class="wrapper">
      <video src="http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge.mp4" type="video/mp4" controls />

      <video controls>
        <source src="http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge.mp4" type="video/mp4">
        <source src="http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge.ogg" type="video/ogg">
      </video>


    </div>

hi, I wonder why these two same videos are not loaded on the browser! each video works well on there though.

1 Answer

Petar Karagenov
Petar Karagenov
8,608 Points

You should embed your video using only one of the two possible ways. If you look at your code using Google Dev Tools, you shall notice that Google Chrome sees your second video tag as a child element of the first and adding another closing video tag.

Dongyun Cho
Dongyun Cho
2,256 Points

crystal clear. thanks a lot.