html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<html id="htmlTag">
<body id="bodyTag" style="background-color:LightGreen;">
<title>The app</title>
</body>
<head id="headTag">
<!-- Button to the Text -->
<h1 id="h1aTag">The App</h1>
<button onclick="Hi()">Button</button>
<p id="P1">The regular app</p>
</head>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
// Here is where the function goes:
function Hi() {
alert("Alert function to see if the button works")
document.write("The background goes in the white place")
/* Here is where I tried to do the back ground */ document.getElementById("bodyTag").style.backgroundColor="red";
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run