Dark-Humor-Site / index.html
Catfishjack007's picture
Create index.html
20ad955 verified
Raw History Blame Contribute Delete
2.26 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dark Humor Central</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #111;
color: #ddd;
text-align: center;
padding: 20px;
}
h1 {
color: #f00;
text-shadow: 2px 2px 5px black;
}
.joke-box {
background: #222;
padding: 20px;
margin: 20px auto;
width: 50%;
border-radius: 10px;
box-shadow: 0px 0px 10px #000;
}
button {
background: #f00;
color: white;
border: none;
padding: 10px 15px;
margin-top: 10px;
cursor: pointer;
font-size: 16px;
border-radius: 5px;
}
button:hover {
background: #900;
}
.footer {
margin-top: 20px;
font-size: 12px;
color: #666;
}
</style>
</head>
<body>
<h1>Dark Humor Central ☠️</h1>
<div class="joke-box">
<p id="joke">Click the button to get a joke!</p>
<button onclick="getJoke()">Give me darkness</button>
</div>
<script>
const jokes = [
"Why don’t graveyards ever get overcrowded? Because people are dying to get in.",
"Dark humor is like food. Not everyone gets it.",
"What’s the difference between a joke and a coffin? Timing.",
"Why don’t skeletons fight each other? They don’t have the guts.",
"Why was the orphan always so good at poker? He didn’t know when to fold.",
"I told my wife she should embrace her mistakes. She gave me a hug."
];
function getJoke() {
const jokeElement = document.getElementById("joke");
const randomJoke = jokes[Math.floor(Math.random() * jokes.length)];
jokeElement.innerText = randomJoke;
}
</script>
<div class="footer">
<p>&copy; 2025 Dark Humor Central. All rights reserved. </p>
</div>
</body>
</html>