29 lines
642 B
HTML
29 lines
642 B
HTML
<!DOCTYPE html>
|
|||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>Color Buttons App</title>
|
||
|
|
<style>
|
||
|
|
body {
|
||
|
|
font-family: Arial, sans-serif;
|
||
|
|
text-align: center;
|
||
|
|
margin-top: 50px;
|
||
|
|
transition: background-color 0.3s ease;
|
||
|
|
}
|
||
|
|
button {
|
||
|
|
padding: 12px 24px;
|
||
|
|
font-size: 18px;
|
||
|
|
margin: 10px;
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<h1>Click a Button to Change Background</h1>
|
||
|
|
<button id="blueBtn">Blue</button>
|
||
|
|
<button id="redBtn">Red</button>
|
||
|
|
<script src="script.js"></script>
|
||
|
|
</body>
|
||
|
|
</html>
|