-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patht.html
More file actions
62 lines (60 loc) · 1.63 KB
/
t.html
File metadata and controls
62 lines (60 loc) · 1.63 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
61
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML with CSS and JavaScript</title>
<style>
/* CSS styles */
body {
font-family: Arial, sans-serif;
line-height: 1.6;
padding: 20px;
}
.container {
max-width: 800px;
margin: 0 auto;
background: #f9f9f9;
padding: 20px;
border: 1px solid #ddd;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
color: #333;
}
p {
color: #666;
}
.button {
display: inline-block;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
text-align: center;
text-decoration: none;
font-size: 16px;
margin-top: 10px;
cursor: pointer;
border: none;
border-radius: 5px;
}
.button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div class="container">
<h1>Hello, HTML with CSS and JavaScript!</h1>
<p>This is a simple example of an HTML file with embedded CSS and JavaScript.</p>
<button class="button" onclick="changeColor()">Click to Change Color</button>
</div>
<script>
// JavaScript code
function changeColor() {
var container = document.querySelector('.container');
container.style.backgroundColor = '#f0f0f0';
}
</script>
</body>
</html>