-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
48 lines (39 loc) · 1.31 KB
/
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
44
45
46
47
48
<!DOCTYPE html>
<html>
<head>
<title>My Cool Website</title>
<style>
img {
width: 600px;
height: auto;
}
h1 {
color: red;
}
</style>
</head>
<body>
<h1>My Cool Website</h1>
<p>I think HTML is neat!</p>
<img src="https://www.lectura-specs.com/models/renamed/orig/rigid-dump-truck-777-g-caterpillar.jpg">
<blockquote>"I looked like this when I was young, and I still do." - Yogi Berra</blockquote>
<button onclick="changeQuote()">Change Quote</button>
<script>
var index = 0;
function changeQuote() {
var quotes = [
`"I really like web development!" - Dave Smith-Hayes`,
`"I am enjoying my time at Hammer Hacks!" - Dave Smith-Hayes`,
`"Dumptrucks!" - My Son`,
`"I looked like this when I was young, and I still do." - Yogi Berra`
];
var blockquote = document.querySelector("blockquote");
blockquote.innerHTML = quotes[index];
index++;
if (index >= 4) {
index = 0;
}
}
</script>
</body>
</html>