Build a single html page that says hello world with an envelope and when you click it a ticket comes out
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello World Envelope</title>
<style>
:root {
color-scheme: light;
--ink: #292442;
--purple: #6d4aff;
--pink: #ff6f9f;
--paper: #fffaf1;
}
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
display: grid;
place-items: center;
overflow: hidden;
color: var(--ink);
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background:
radial-gradient(circle at 15% 15%, #ffd7e4 0 3px, transparent 4px),
radial-gradient(circle at 85% 25%, #ffd7e4 0 4px, transparent 5px),
radial-gradient(circle at 72% 82%, #c9c1ff 0 3px, transparent 4px),
linear-gradient(135deg, #fff5e8, #e9e3ff);
}
main {
width: min(92vw, 620px);
text-align: center;
padding: 34px 18px 48px;
}
h1 {
margin: 0 0 8px;
font-size: clamp(2.5rem, 10vw, 5.2rem);
line-height: .95;
letter-spacing: -.07em;
}
h1 span { color: var(--purple); }
.subtitle {
margin: 0 0 38px;
color: #6c6681;
font-size: clamp(1rem, 3vw, 1.2rem);
}
.scene {
height: 275px;
display: grid;
place-items: end center;
}
.envelope {
position: relative;
width: min(78vw, 330px);
height: 205px;
padding: 0;
border: 0;
background: transparent;
cursor: pointer;
perspective: 800px;
}
.envelope:focus-visible {
outline: 4px solid #2e1ea7;
outline-offset: 10px;
border-radius: 12px;
}
.ticket {
position: absolute;
z-index: 2;
left: 10%;
bottom: 55px;
width: 80%;
height: 120px;
padding: 17px 18px;
text-align: left;
border: 2px dashed #ef6995;
border-radius: 8px;
color: #35284d;
background: var(--paper);
box-shadow: 0 8px 18px #51427a24;
transform: translateY(75px) rotate(-3deg);
transition: transform .75s cubic-bezier(.2,.8,.2,1), box-shadow .75s;
}
.open .ticket {
transform: translateY(-82px) rotate(-3deg);
box-shadow: 0 16px 24px #51427a30;
}
.ticket strong {
display: block;
margin-bottom: 13px;
font-size: 1.15rem;
}
.ticket small { color: #867b93; }
.ticket .stub {
position: absolute;
top: 0;
right: 0;
width: 33px;
height: 100%;
display: grid;
place-items: center;
border-left: 2px dashed #ef6995;
writing-mode: vertical-rl;
font-size: .7rem;
letter-spacing: .12em;
color: #d0527e;
}
.body {
position: absolute;
z-index: 3;
inset: 45px 0 0;
overflow: hidden;
border-radius: 10px;
background: linear-gradient(145deg, #ff9ebc, #ef5f95);
box-shadow: 0 18px 30px #684b912e;
}
.body:before, .body:after {
content: "";
position: absolute;
bottom: -2px;
width: 72%;
height: 110px;
background: #ffb0c8;
}
.body:before { left: -28%; transform: rotate(31deg); }
.body:after { right: -28%; transform: rotate(-31deg); }
.flap {
position: absolute;
z-index: 4;
top: 45px;
left: 0;
width: 100%;
height: 115px;
clip-path: polygon(0 0, 100% 0, 50% 100%);
background: linear-gradient(135deg, #ffb3c8, #ff7da6);
transform-origin: top center;
transition: transform .65s cubic-bezier(.2,.8,.2,1);
}
.open .flap { transform: rotateX(180deg); z-index: 1; }
.seal {
position: absolute;
z-index: 5;
top: 91px;
left: calc(50% - 17px);
width: 34px;
height: 34px;
display: grid;
place-items: center;
border-radius: 50%;
color: white;
background: var(--purple);
font-size: 1.05rem;
box-shadow: 0 3px 7px #4b319c55;
transition: opacity .3s, transform .4s;
}
.open .seal { opacity: 0; transform: scale(.6); }
.hint {
margin: 20px 0 0;
color: #6c6681;
font-size: .95rem;
}
@media (prefers-reduced-motion: reduce) {
.ticket, .flap, .seal { transition-duration: .01ms; }
}
</style>
</head>
<body>
<main>
<h1>Hello <span>World</span>!</h1>
<p class="subtitle">A little surprise is waiting for you.</p>
<section class="scene" aria-label="Interactive envelope">
<button class="envelope" type="button" aria-expanded="false" aria-label="Open envelope">
<div class="ticket">
<strong>✦ ADMIT ONE ✦</strong>
<small>HELLO WORLD</small>
<div class="stub">GOOD VIBES</div>
</div>
<div class="body"></div>
<div class="flap"></div>
<div class="seal">✉</div>
</button>
</section>
<p class="hint" aria-live="polite">Click the envelope to reveal your ticket</p>
</main>
<script>
const envelope = document.querySelector('.envelope');
const hint = document.querySelector('.hint');
envelope.addEventListener('click', () => {
const opened = envelope.classList.toggle('open');
envelope.setAttribute('aria-expanded', opened);
envelope.setAttribute('aria-label', opened ? 'Close envelope' : 'Open envelope');
hint.textContent = opened ? 'You made it — welcome to the world!' : 'Click the envelope to reveal your ticket';
});
</script>
</body>
</html>
Nothing. This page is entirely self-contained and contacts no other website when it runs.
Published on Globefin under the MIT License. You may copy, change, and reuse this page, including commercially — just keep the notice below with it.
Copyright © 2026 Jacob Lang. Licensed under the MIT License. Published on Globefin.
Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →
Scripts run, but the demo has its own throwaway origin. It can't read your session or cookies, can't reach the page around it, and can't navigate your tab. Don't enter real passwords or personal data into any demo.