I am trying to put my innerHTML
text inside of my paragraph element I created but its not working. I don't understand what I'm doing wrong. Can someone please tell me how I can fix this?
<!DOCTYPE html>
<html>
<head>
<title>
JavaScript Tutorials
</title>
<style>
#output {
width: 120px;
height: 20px;
background-color: #CCC;
border: 1px solid #666;
}
</style>
<script>
var apples = 25;
var oranges = 30;
if (apples < oranges) {
document.getElementById("output").innerHTML = "Whats up guys";
}
</script>
</head>
<body>
<p id="output"></p>
</body>
</html>