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

JavaScript Treehouse Club: JavaScript Car Sounds Editing Your HTML

Entered "images/bikeLock.png." Not sure why it's telling me "Oops! It looks like Task 1 no longer passing.

Question: Edit the HTML document to change the button image to "images/bikeLock.png”.

Answered:
<!--Bike image --> <img src="images/bikeLock.png" class="bike" alt="bike">

index.html
<!DOCTYPE html>
<html lang="en">

  <head>
  <meta name="charset" value="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=0.5, minimal-ui">
    <title>Car Sounds</title>

    <!--Style Sheet link-->
    <link rel="stylesheet" type="text/css" href="css/style.css">
  </head>

  <body>

    <!--Bike image -->
    <img src="images/bikeLock.png" class="bike" alt="bike">


    <!--Button-->
    <a href="javascript:startCar();"><img src="images/key.png" alt="key"></a>


    <!--Audio Files-->
    <audio id="startCar" src="sounds/startCarA.mp3" preload="auto"></audio>


    <!--Javascript-->
    <script type="text/javascript">
        function startCar() {
            document.getElementById('startCar').play();
        }

    </script>

  </body>

</html>

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! The most common reason for receiving a "Task 1 is no longer passing" message is a syntax error that is making the current step fail. However, you've run into one of those rare scenarios where you had passing code for Step 1, but have altered it. The first step asks that you change the car's image tag to be "images/bike.png". And you must've done that just fine, because you got to step two.

But the second step asks that you change the button's image tag to the "images/bikeLock.png". But you changed the car's image tag instead of the button's image tag. Which means that you edited your previously passing code. So the car's image tag no longer meets the requirements.

If you look you'll see:

 <!--Bike image -->

<!--Button-->

Syntactically, your code is fine. It's just that you've changed it.

I think you can get it with these hints, but let me know if you're still stuck! :sparkles: