-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
34 lines (29 loc) · 1.3 KB
/
index.html
File metadata and controls
34 lines (29 loc) · 1.3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Application</title>
<style>
/* selector{property-name : value} */
.img{ width: 80%; height: 50vh; display: block; margin: auto;}
.tab{ display: flex;}
.tab li{ list-style: none; padding: 1%; background-color: tomato; margin-right: 1%; color:white;}
</style>
</head>
<body>
<h1 id="demo">Welcome To HTML.</h1>
<ul class="tab">
<li onclick='document.getElementById("demo").innerHTML="Welcome to Javascript Module 1";'>Tab 1</li>
<li onclick='document.getElementById("demo").innerHTML="Welcome to Javascript Module 2";'>Tab 2</li>
<li onclick='document.getElementById("demo").innerHTML="Welcome to Javascript Module 3";'>Tab 3</li>
<li onclick='document.getElementById("demo").innerHTML="Welcome to Javascript Module 4";'>Tab 4</li>
</ul>
<script>
document.write("<h1>Hello In JavaScript</h1>");
document.write('<img src="image/banner.jpg" class="img" alt="Banner">');
document.getElementById("demo").innerHTML="Welcome to Javascript";
</script>
</body>
</html>