-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathindex.html
43 lines (37 loc) · 898 Bytes
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head id="head">
<title>Example HTML Website</title>
</head>
<body>
<header>
<h1>My Website</h1>
</header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<main>
<h2>Welcome to My Website</h2>
<p>This is a simple website.</p>
<button onclick="addCSS()" id="button">Toggle CSS</button>
</main>
<footer>
<p>Copyright © App Brewery</p>
</footer>
<script>
let counter = 0
function addCSS() {
counter++
if (counter % 2 !== 0) {
document.getElementById("head").innerHTML = ' <title>Example HTML Website</title> \n<link rel="stylesheet" href="./styles.css" />'
} else {
document.getElementById("head").innerHTML = ' <title>Example HTML Website</title> '
}
}
</script>
</body>
</html>