loading...
V-L-D-M-R K-L-J-K

Coding Hobo/ Nomad

Father

UI/ UX Developer and Designer

Storyteller

Freelancer

Soccer Fanatic

 V-L-D-M-R K-L-J-K
 V-L-D-M-R K-L-J-K
 V-L-D-M-R K-L-J-K
 V-L-D-M-R K-L-J-K
V-L-D-M-R K-L-J-K

Coding Hobo/ Nomad

Father

UI/ UX Developer and Designer

Storyteller

Freelancer

Soccer Fanatic

Stories

Sample Code: My First Silly Website

August 7, 2025 design, Footer, photos, Technology
Sample Code: My First Silly Website

Here’s a playful, beginner-friendly Bootstrap website that introduces HTML, CSS, and JavaScript in a lighthearted way. It’s called “My First Silly Website”—complete with a dancing button, a color-changing header, and a surprise alert.

🧩 Files Included:

  • index.html (main page)
  • style.css (custom styles)
  • script.js (JavaScript fun)

Index:

<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>My First Silly Website</title>
<link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”>
<link rel=”stylesheet” href=”style.css”>
</head>
<body class=”text-center mt-5″>

<h1 id=”main-header” class=”text-primary”>Welcome to My Silly Site!</h1>
<p class=”lead”>Click the button below to unleash chaos.</p>

<button id=”silly-button” class=”btn btn-warning btn-lg”>Do Not Click Me</button>

<div class=”mt-5″>
<img src=”https://placekitten.com/300/200″ alt=”Random Kitten” class=”img-fluid rounded shadow”>
<p class=”text-muted mt-2″>Because every site needs a kitten.</p>
</div>

<script src=”script.js”></script>
</body>
</html>

CSS:

body {
background-color: #f0f8ff;
font-family: ‘Comic Sans MS’, cursive, sans-serif;
}

#silly-button {
animation: wiggle 1s infinite;
}

@keyframes wiggle {
0% { transform: rotate(0deg); }
25% { transform: rotate(5deg); }
50% { transform: rotate(-5deg); }
75% { transform: rotate(5deg); }
100% { transform: rotate(0deg); }
}

JS:

document.getElementById(“silly-button”).addEventListener(“click”, function() {
alert(“You clicked the forbidden button! Now the header changes color.”);
const header = document.getElementById(“main-header”);
header.style.color = “hotpink”;
header.textContent = “Chaos Unleashed!”;
});

🛠 What This Teaches:

  • HTML: Structure of a webpage (headings, buttons, images)
  • Bootstrap: Quick styling with classes like btn, text-center, img-fluid
  • CSS: Custom styles and animations
  • JavaScript: Interactivity (click events, DOM manipulation)

Loading


Discover more from Vladimir Kuljak

Subscribe to get the latest posts sent to your email.

Tags:
Related Posts
mm2
The Burge Union Chronicles: Strategic Outlooks, Catered Lunches, and the Rise of the IAP

October 14–15, 2025. The Forum C chamber at Burge Union transformed into a strategic amphitheater where the ATLAS KU team…

Loading

jrp
🐓 The Great JRP Workday Chronicles: Snacks, Camtasia, and Wing Keys

October 13, 2025. A date that shall echo through the halls of JRP like the sound of a rogue Camtasia…

Loading