A html page that says hello world by clicking on the globe of the earth and it spins around a few times and then randomly stops on a certain country and then says "Hello World" in that countries langu
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Hello Around the World</title>
<style>
:root{--ink:#eff8ff;--muted:#9bb8cf;--globe:#183f70;--land:#61d6a0;--accent:#ffd166}
*{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,Segoe UI,sans-serif;
background:
radial-gradient(circle at 20% 20%,#173866 0 1px,transparent 2px),
radial-gradient(circle at 78% 30%,#b9e9ff 0 1px,transparent 2px),
radial-gradient(circle at 66% 82%,#173866 0 1px,transparent 2px),
linear-gradient(145deg,#071426,#0d2038 55%,#07111e);
background-size:170px 160px,230px 220px,190px 210px,100% 100%;
}
main{text-align:center;width:min(92vw,720px);padding:28px 16px}
.eyebrow{letter-spacing:.2em;text-transform:uppercase;font-size:.72rem;color:var(--accent);font-weight:700}
h1{font-size:clamp(2rem,7vw,4.2rem);line-height:1.05;margin:.45rem 0 .6rem}
.intro{color:var(--muted);margin:0 auto 1.4rem;max-width:440px;font-size:1.05rem}
.stage{position:relative;width:min(76vw,370px);margin:auto}
.stage:after{content:"";position:absolute;inset:8% 12% -4%;border-radius:50%;background:#42b4ff33;filter:blur(25px);z-index:-1}
button{
display:block;border:0;padding:0;background:none;cursor:pointer;width:100%;
border-radius:50%; touch-action:manipulation;
}
button:focus-visible{outline:4px solid var(--accent);outline-offset:9px}
svg{display:block;width:100%;height:auto;filter:drop-shadow(0 18px 25px #0008)}
.globe-face{fill:url(#ocean);stroke:#8fe3ff;stroke-width:2}
#spin-group{transform-box:fill-box;transform-origin:center;transition:transform 3.2s cubic-bezier(.18,.76,.22,1)}
.grid{fill:none;stroke:#91d8eb;stroke-opacity:.28;stroke-width:1.4}
.land{fill:var(--land);stroke:#b7f3c9;stroke-width:1.2;opacity:.92}
.marker{fill:var(--accent);stroke:#fff4c2;stroke-width:2}
.hint{margin:.9rem 0 0;color:var(--muted);font-size:.9rem}
.result{min-height:100px;margin-top:1.1rem}
.hello{font-size:clamp(2rem,8vw,4rem);font-weight:800;letter-spacing:-.04em;margin:0}
.country{color:var(--accent);font-size:1rem;margin-top:.35rem}
.spinning .hint{color:var(--accent)}
@media (prefers-reduced-motion:reduce){
#spin-group{transition-duration:1ms!important}
}
</style>
</head>
<body>
<main>
<div class="eyebrow">A tiny trip around Earth</div>
<h1>Say hello to the world</h1>
<p class="intro">Click the globe. It will whirl through a few countries, then choose one at random.</p>
<div class="stage" id="stage">
<button id="globeButton" aria-label="Spin the globe">
<svg viewBox="0 0 400 400" role="img" aria-labelledby="globeTitle">
<title id="globeTitle">A clickable spinning globe</title>
<defs>
<radialGradient id="ocean" cx="35%" cy="25%">
<stop offset="0" stop-color="#397fb3"/><stop offset=".65" stop-color="#19527f"/><stop offset="1" stop-color="#0b2b52"/>
</radialGradient>
<clipPath id="globeClip"><circle cx="200" cy="200" r="158"/></clipPath>
</defs>
<circle class="globe-face" cx="200" cy="200" r="158"/>
<g clip-path="url(#globeClip)">
<g id="spin-group">
<ellipse class="grid" cx="200" cy="200" rx="72" ry="158"/>
<ellipse class="grid" cx="200" cy="200" rx="145" ry="158"/>
<path class="grid" d="M42 150Q200 220 358 150M42 250Q200 180 358 250M52 105Q200 150 348 105M52 295Q200 250 348 295"/>
<path class="land" d="M76 116l22-22 35 5 18 25-15 19-31-4-18 20-23-11z"/>
<path class="land" d="M145 169l25 5 14 29-9 35-18 34-17-7 5-42-13-27z"/>
<path class="land" d="M205 94l31-12 34 15 18 29-19 17-26-7-17 18-25-21z"/>
<path class="land" d="M246 163l32-10 38 23 9 27-28 12-12 35-29-8-5-31-20-20z"/>
<path class="land" d="M292 263l25-8 24 16-8 27-32 12-20-19z"/>
<path class="land" d="M179 275l21 6 14 28-17 26-22-8-9-27z"/>
</g>
</g>
<circle class="marker" cx="200" cy="41" r="5"/>
</svg>
</button>
</div>
<p class="hint" id="hint">Tap or press Enter to spin</p>
<section class="result" aria-live="polite">
<p class="hello" id="hello">Hello World</p>
<div class="country" id="country">Where will we land?</div>
</section>
</main>
<script>
const places = [
["France","Bonjour le monde"],["Japan","こんにちは世界"],["Brazil","Olá, mundo"],
["Spain","Hola mundo"],["Italy","Ciao mondo"],["Germany","Hallo Welt"],
["Greece","Γεια σου κόσμε"],["India","नमस्ते दुनिया"],["South Korea","안녕하세요 세계"],
["Sweden","Hej världen"],["Turkey","Merhaba dünya"],["Hawaii","Aloha honua"]
];
const button = document.getElementById("globeButton");
const group = document.getElementById("spin-group");
const hello = document.getElementById("hello");
const country = document.getElementById("country");
const hint = document.getElementById("hint");
const stage = document.getElementById("stage");
let busy = false, angle = 0;
function spin(){
if(busy) return;
busy = true;
stage.classList.add("spinning");
hint.textContent = "Spinning around the planet…";
hello.textContent = "…";
country.textContent = "Choosing a destination";
const picked = places[Math.floor(Math.random()*places.length)];
angle += 1440 + Math.floor(Math.random()*5)*72;
group.style.transform = `rotate(${angle}deg)`;
setTimeout(() => {
hello.textContent = picked[1];
country.textContent = `Hello World in ${picked[0]}`;
hint.textContent = "Click again to take another trip";
stage.classList.remove("spinning");
busy = false;
}, 3250);
}
button.addEventListener("click", spin);
button.addEventListener("keydown", e => {
if((e.key === "Enter" || e.key === " ") && e.target === button){
e.preventDefault(); spin();
}
});
</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 Davis Brown. 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.