Skip to content

Instantly share code, notes, and snippets.

@matthieua
Created May 5, 2020 18:32
Show Gist options
  • Save matthieua/7688a6c918882e23ab1845e1da051679 to your computer and use it in GitHub Desktop.
Save matthieua/7688a6c918882e23ab1845e1da051679 to your computer and use it in GitHub Desktop.
<html>
<head>
<style>
h1 {
text-align: center;
color: blueviolet;
}
h2 {
text-align: center;
border: 1px solid blueviolet;
border-radius: 4px;
padding: 15px 20px;
}
img {
max-width: 100%;
border-radius: 10px;
}
p {
line-height: 1.5;
font-size: 13px;
}
button {
display: block;
margin: 20px auto;
color: white;
font-size: 20px;
border-radius: 30px;
padding: 20px 30px;
border: none;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
background: blueviolet;
transition: all 150ms ease-in-out;
}
button:hover {
opacity: 80%;
cursor: pointer;
}
footer {
text-align: center;
font-size: 12px;
}
</style>
</head>
<body>
<h1>
Hawaii
</h1>
<h2>
US State
</h2>
<img src="https://wallpapercave.com/wp/hEX3bY8.jpg" alt="" />
<p>
Hawaii is a state of the United States of America located in the Pacific
Ocean. It is the only U.S. state located outside North America and the
only island state. The state encompasses nearly the entire Hawaiian
archipelago, 137 islands spread over 1,500 miles.
</p>
<a href="https://en.wikipedia.org/wiki/Hawaii">
Learn more on Wikipedia
</a>
<button>
🌺 Go to Hawaii
</button>
<footer>
Build by 👩‍💻
<a href="https://www.shecodes.io">
SheCodes
</a>
</footer>
<script>
function goToHawaii() {
let name = prompt("What is your name?");
let email = prompt("What is your email?");
alert(`Thanks ${name}! We'll get in touch by email! Meanwhile wash your keyboard 🌺`);
}
let button = document.querySelector("button");
button.addEventListener("click", goToHawaii);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment