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 and Source Elements

on the <source> element, add an src attribute

On the <source> element, add an src attribute and set the value to the URL http://treehoues-code-samples.s3.amazonaws.com/html-video-and-audio/bridge.mp4

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML Video and Audio</title>

    <link rel="stylesheet" href="normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="main.css">
  </head>
  <body>

    <h1>HTML Video and Audio</h1>

    <div class="wrapper">

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

      <!-- Add your code below this line -->


    </div>

  </body>
</html>

7 Answers

Alex Heil
Alex Heil
53,547 Points

hey, you're currently hitting a "bummer" message on the challenge because the source url is not matching with the one in the task. while you're using html-video-audio the url should be html-video-and-audio

if you change that part you'll pass the challenge ;) hope that helps and have a nice day.

I have done as you have said but still, am still hitting the bummer! And its saying task 2 no longer passing

<video> <source src="http://treehouse-codes-samples.s3.amzonaws.com/html-video-and-audio/bridge.mp4> </video>

Alex Heil
Alex Heil
53,547 Points

I just pasted your code onto the challenge and tested it out, 2 things to look at (depending on which block you're using).

1) make sure that you add the " at the end of the line to close the source url (for the code you just shared in the comment).

2) also for the code in your first post make sure there's a space between the source and the type, otherwise it won't work as well.

after applying these things your code worked fine on the challenge - hope that helps ;)

Ken Wilson
Ken Wilson
7,885 Points

This does not work either. replacing type="video.mp4" with type="html-video-audio" is not correct.

Hi I am new at this but I figured that it was the way I put in the code this should be the right way.

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML Video and Audio</title>

<link rel="stylesheet" href="normalize.css">
<link href='http://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="main.css">

</head> <body>

<h1>HTML Video and Audio</h1>

<div class="wrapper">

  <!-- Add your code below this line -->
  <video controls> 
    <source src= "http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge.mp4" /></video>



</div>

</body> </html>

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

Thank you, Valentin. 4 years on and the same problem persists.

Ian Rushton
Ian Rushton
15,789 Points

The code should read as follows.

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

Hope this helps :)

silvia flores
silvia flores
3,464 Points

yes. yu need source type written in not just type. i was going over notes.. over site.

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML Video and Audio</title>

<link rel="stylesheet" href="normalize.css">
<link href='http://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="main.css">

</head> <body>

<h1>HTML Video and Audio</h1>

<div class="wrapper">

  <!-- Add your code below this line -->
  <video controls> 
    <source src= "http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge.mp4" /></video>



</div>

</body> </html>

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

<video>

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

</video>

I figure it out by changing the part of the "type" coz it needs to point out what particular type of object you are going place in the html.. so I tried to change it into this ---> type = "video/mp4"

Aaron Espinoza
Aaron Espinoza
891 Points

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML Video and Audio</title>

<link rel="stylesheet" href="normalize.css">
<link href='http://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="main.css">

</head> <body>

<h1>HTML Video and Audio</h1>

<div class="wrapper">

  <!-- Add your code below this line -->

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

</div>

</body> </html>