Skip to content

Instantly share code, notes, and snippets.

@junecastillote
Created September 16, 2020 12:25
Show Gist options
  • Save junecastillote/c84869aec1fbc59c807053ecc710c444 to your computer and use it in GitHub Desktop.
Save junecastillote/c84869aec1fbc59c807053ecc710c444 to your computer and use it in GitHub Desktop.
Example of a Static Website
// button.js
var btn = document.querySelector('button')
btn.addEventListener('click', function() {
document.querySelector('p').style.display = 'block'
})
<!-- index.html -->
<html>
<head>
<title>Static Site Test</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Static Web Test</h1>
<div>
<button>Click to see what happens</button>
</div>
<p style="display: none;">Surpise!!!</p>
<script src="button.js"></script>
</body>
</html>
/* style.css */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
button {
background: lightgrey;
color: black;
border: 1px solid darkgray;
font: inherit
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment