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

Edit the HTML document to change the button image to "images/bikeLock.png". but when I do it says challenge one is wrong

I'm doing everything correct why is it not leeting me go on?

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>

    <!--Car image -->
    <img src="images/bikeLock.png" 


    <!--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>

4 Answers

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

Hi there! There's a couple of things going on here. First, you've managed to erase some HTML that was in the "Car image" section including the removal of the closing tag which is causing an error. Secondly, it wants you to change the image in the "Button" section to images/bikeLock.png, but you've changed it in the "Car image" section.

Give it another shot with these hints in mind! :sparkles:

thank u

Mike Bozee
Mike Bozee
39,385 Points

Make sure to update the <!--Button--> image, not the <!--Car image --> image for challenge 2:

EDIT: I removed my html embed, so you can follow my and Jennifer's hints.

that was it thanks mike

i need help with task 2 i dont understand

Edit the HTML document to change the button image to “images/bikeLock.png".

this is for javascript task 2 challenge

<!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>

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


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


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