Proyek HTML buatan @fikri-sodikin, lolos kurasi Galeri Hyper Sheets. Lihat hasilnya dan kodenya, lalu coba buat versimu sendiri.
Oleh @fikri-sodikin · HTML
<!doctype html>
<html>
<head>
<style>body {
font-family: sans-serif;
padding: 24px;
background: #f7f9fc;
}
button {
background: #f97316;
color: white;
border: none;
padding: 12px 20px;
border-radius: 8px;
font-size: 16px;
}</style>
</head>
<body>
<h1>Halo dari HP-mu!</h1>
<button id="tombol">Klik aku</button>
<script>
const tombol = document.getElementById("tombol");
let n = 0;
tombol.addEventListener("click", () => {
n++;
tombol.textContent = "Diklik " + n + " kali";
console.log("klik ke-" + n);
});
</script>
</body>
</html>