-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
60 lines (52 loc) · 1.41 KB
/
index.html
File metadata and controls
60 lines (52 loc) · 1.41 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
<Style>
h1{
color:blueviolet;
background-color:burlywood;
}
</Style>
</head>
<body>
<header>
<h1>Class 1 Lab</h1>
<nav>
<Ul>
<li><a href="#">Home</a></li>
<li><a href="#">About me</a></li>
<li><a href="#">Categories</a></li>
</Ul>
</nav>
</header>
<main>
<p style=color:blueviolet;background-color:burlywood >What is your name?</p>
<p style=color:burlywood;background-color:blueviolet>
How old are you?
</p>
<p style=color:azure;background-color:chocolate>What is your favourite Icecream, Strawberry or Chocolate?</p>
<p style=color:darkgray;background-color:darkorchid>Did you have a great time?</p>
</main>
<footer>
<script>
let userName=prompt("What is your name?");
console.log(userName);
let age=prompt("How old are you")
console.log(age);
if (age>18) {document.write("<h2 Style=color:Red;>Welcome</h2>")
alert( " Hello " + userName + " you are " + age )
}
else {document.write("<h2 Style=color:Red;>Go away</h2>")}
let favouriteIceCreamFlavor=prompt("What is your favourite Icecream, Strawberry or Chocolate?")
console.log(favouriteIceCreamFlavor)
alert('I Like all flavors :)')
let enjoy=prompt("Did you have a great time?")
while (enjoy !== "yes" && enjoy !== "no" )
{ enjoy= prompt('Please answer with yes or no')
}
console.log(enjoy)
</script>
</footer>
</body>
</html>