html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title>Delayed Change</title>
<style>
body {
background-color: white; /* Initial background */
margin: 0; /* Remove default body margin */
display: flex; /* Center content */
justify-content: center; /* Center horizontally */
align-items: center; /* Center vertically */
height: 100vh; /* Make body full viewport height */
font-size: 2em; /* Increase font size */
font-family: sans-serif;
color: black;
}
</style>
</head>
<body>
<script>
setTimeout(function() {
document.body.style.backgroundColor = "lightblue";
document.body.innerHTML = "And...";
}, 5000); // 5000 milliseconds = 5 seconds
setTimeout(function() {
document.body.style.backgroundColor = "lightblue";
css
css
1
2
3
body {
}
js
js
1
BROWSER
Console
Uruchom