Malvina Hevia
HTML
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contoh HTML, CSS, dan JS</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Selamat datang di Halaman Saya!</h1>
<button onclick="ubahWarna()">Ubah Warna Latar Belakang</button>
</div>
<div class="links-container">
<h2>Daftar Link:</h2>
<ul>
<li><a href="https://hype.co/@lainfiltrada2024onlineespanol" target="_blank">lainfiltrada2024onlineespanol</a></li>
<li><a href="https://hype.co/@pelispluslainfiltradaespanol" target="_blank">pelispluslainfiltradaespanol</a></li>
<li><a href="https://hype.co/@terrifier32024onlineenespanol" target="_blank">terrifier32024onlineenespanol</a></li>
<li><a href="https://hype.co/@terrifier3onlineenespanol" target="_blank">terrifier3onlineenespanol</a></li>
<li><a href="https://hype.co/@robotsalvajeonlineenespanol" target="_blank">robotsalvajeonlineenespanol</a></li>
<li><a href="https://hype.co/@venomelultimobaileenespanol" target="_blank">venomelultimobaileenespanol</a></li>
<li><a href="https://hype.co/@venomelultimobaile2024espanol" target="_blank">venomelultimobaile2024espanol</a></li>
<li><a href="https://hype.co/@redone2024onlineenespanol" target="_blank">redone2024onlineenespanol</a></li>
<li><a href="https://hype.co/@transformersone2024espanol" target="_blank">transformersone2024espanol</a></li>
<li><a href="https://hype.co/@deadpoolylobezno2024espanol" target="_blank">deadpoolylobezno2024espanol</a></li>
<li><a href="https://hype.co/@smile22024onlineenespanol" target="_blank">smile22024onlineenespanol</a></li>
<li><a href="https://hype.co/@juror22024onlineenespanol" target="_blank">juror22024onlineenespanol</a></li>
<li><a...
CSS
/* CSS untuk styling halaman */
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 100vh;
margin: 0;
transition: background-color 0.5s ease;
}
h1 {
text-align: center;
font-size: 3rem;
}
button {
padding: 10px 20px;
font-size: 1.2rem;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #45a049;
}
.container {
text-align: center;
margin-bottom: 20px;
}
.links-container {
width: 80%;
margin-top: 20px;
}
ul {
list-style-type: none;
padding: 0;
}
ul li {
margin: 10px 0;
}
ul li a {
text-decoration: none;
color: #007bff;
font-size: 1.2rem;
}
ul li a:hover {
text-decoration: underline;
}
JavaScript
function ubahWarna() {
const warna = ['#FF5733', '#33FF57', '#3357FF', '#F1C40F', '#9B59B6'];
const warnaAcak = warna[Math.floor(Math.random() * warna.length)];
document.body.style.backgroundColor = warnaAcak;
}