Bummer! To download videos, you'll need to sign up for a Courses Plus or Techdegree plan or sign into your existing account below.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
In this video you are going to be learning about some new features in HTML and how to upload a picture.
Code for copy/paste:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="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 href="css/style.css" rel="stylesheet">
</head>
<body>
<!--Car image -->
<img src="images/car1.png" class="car" alt="car">
<!--Buttons-->
<a href="javascript:startCar();"><img src="images/key.png" alt="key"></a>
<a href="javascript:honkHorn();"><img src="images/steering-wheel.png" alt="steering wheel"></a>
<a href="javascript:peelOut();"><img src="images/nos.png" alt="nos"></a>
<!--Audio Files-->
<audio id="startCar" src="sounds/startCarA.wav" preload="auto"></audio>
<audio id="honkHorn" src="sounds/honkHorn.wav" preload="auto"></audio>
<audio id="peelOut" src="sounds/peelOut.wav" preload="auto"></audio>
<!--Javascript-->
<script type="text/javascript">
function startCar() {
document.getElementById('startCar').play();
}
function honkHorn() {
document.getElementById('honkHorn').play();
}
function peelOut() {
document.getElementById('peelOut').play();
}
</script>
</body>
</html>
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up