Skip to content
Minesweeper
Neocities — Minesweeper Embed Guide

Platform guide

How to Add Minesweeper to a Neocities Site

Neocities is the easiest platform in this series, because there is no editor to fight with — you write HTML and it serves HTML. Paste the iframe into your page, hit save, and the board is live. The interesting part is what to do with it once it is there.

Time needed
Under a minute
File to edit
index.html
Storage used
None
Best theme
theme=retro
Drop this into your HTML
<div style="text-align:center;margin:24px 0">
  <iframe
    src="https://play-minesweeper.games/embed/?size=beginner&theme=retro"
    width="316"
    height="437"
    frameborder="0"
    title="Minesweeper Game"></iframe>
  <p style="font:12px/1.5 Tahoma,'MS Sans Serif',Geneva,sans-serif;color:#555555;margin:6px 0 0">
    <a href="https://play-minesweeper.games/" style="color:#555555">Play Minesweeper</a> — free online Minesweeper, no download
  </p>
</div>

No script tag, no library, no build step. Delete the wrapping div if your layout already centres its content. Keep the credit paragraph under the frame — that link is the whole reason the embed is free, and on a hand-written page it is trivial to restyle: strip the inline style and let your own stylesheet colour it.

Pasting the game into your Neocities page

  1. Generate and copy the embed code

    Pick a board size on the embed generator, switch the theme to retro if your site has a nineties look, and copy the full snippet — the iframe plus the credit paragraph under it. Neocities is raw HTML hosting, so you paste the code exactly as generated, both parts.

  2. Open your dashboard and find the page

    Log in to Neocities and open your dashboard, which lists every file on your site. Decide whether the game goes on your front page (index.html) or on a page of its own.

  3. Click Edit on the file

    Hover the file in the dashboard and click the Edit link that appears, which opens the built-in text editor with your page source. If you want a separate page instead, use the new file button first, name it something like games.html, and edit that.

  4. Paste the iframe inside the body

    Place both parts inside the body of the page at the point where the game should appear, keeping the credit paragraph directly under the iframe — never inside the head section, where the browser will ignore it. Wrap them in a centring div, or the classic center tag, if the rest of your layout is centred.

  5. Save, then view the live page

    Click Save in the editor toolbar, then use View to open the published page. Neocities updates immediately, so if the board does not appear, the problem is in your markup rather than a deployment delay.

Match it to an old-web layout

Neocities sites tend to be deliberately period-correct, and a modern flat game board sitting in the middle of a tiled-background, table-layout page looks wrong. The theme=retro parameter exists for exactly this: silver #C0C0C0 panels, white-and-grey bevelled cells, sharp corners, the red seven-segment mine counter and the yellow smiley that changes face when you click.

If you are building a Windows-desktop-style page, put the board inside your own fake window chrome and hide the frame border. The game already draws its own bevels, so a plain frameborder="0" iframe sits inside a title-bar div convincingly:

<div class="win95-window">
  <div class="titlebar">Minesweeper</div>
  <iframe src="https://play-minesweeper.games/embed/?size=beginner&theme=retro&branding=false"
    width="316" height="407" frameborder="0" title="Minesweeper"></iframe>
</div>
<p class="status-bar">
  <a href="https://play-minesweeper.games/">Play Minesweeper</a> — free online Minesweeper, no download
</p>

Setting branding=false hides the "Powered by" line drawn inside the frame, which is worth about 30 pixels of height — that is why the height above is 407 rather than 437. It does not remove the credit paragraph, and nothing does: that link lives in your page, not ours, and it is the deal that keeps the embed free. Here it has been restyled into a status-bar strip under the fake window, which suits the layout better than the default grey — that kind of change is entirely welcome, as long as the link still points at the game.

Frames, widths and the content pane

A large number of Neocities templates are built around a navigation column and a content iframe, usually named content, which loads each page. If you paste the game into a page that is loaded into that pane, you are nesting a frame inside a frame. That works in every browser, but the width the board has to live in is the pane's width, not the window's.

Measure the pane, then choose:

  • Under 400px of pane width — Beginner 9×9 (316 × 437), or a smaller custom board such as ?size=7x7&mines=6.
  • 500 to 700px — Intermediate 16×16 (540 × 661).
  • Full-width layouts on desktop — Expert 30×16 (988 × 661).

Fixed pixel widths are correct here. A percentage width on the iframe would stretch the frame but not the board inside it, leaving the game floating in empty space.

Ideas that suit a Neocities page

  • A games room page. Link it from your index alongside your other pages; several boards at different difficulties on one page costs you nothing in storage.
  • A guestbook reward. Put the board under the guestbook as a thank-you for signing.
  • A shrine sub-page. If your site has a Windows 95 or old-PC section, an actual working Minesweeper is a better artefact than a screenshot of one.
  • A 404 page. Paste the board into not_found.html so a dead link turns into a game instead of an apology.

If you would rather send visitors to a full-screen board than embed one, the main game and the custom board sizes both work as plain links from any page.

Neocities embed questions

Does an embedded game use up my Neocities storage?
No. An iframe is a few hundred bytes of HTML in your page — the game itself is served from play-minesweeper.games and never touches your quota. That makes it one of the few ways to add something substantial to a free Neocities site without spending any of your 1 GB.
Does it work on a free Neocities account?
Yes, with no restrictions. Neocities does not filter tags in the HTML you upload, so free accounts can use iframes exactly like supporter accounts. There is nothing to enable and no plan to upgrade.
Which file should I edit?
index.html is your homepage. If you would rather keep the front page tidy, create a new file such as games.html, paste the iframe there, and add a link to it from your navigation. Both routes take the same snippet.
Will it work with a frames-based Neocities layout?
Yes. Plenty of Neocities templates load pages into an iframe named "content", and nesting the game frame inside that works fine. The catch is width: the game is sized against the inner content frame, not the browser window, so measure the content frame before choosing a board size.
Can I make it look like the real Windows 95 Minesweeper?
Add &theme=retro to the embed URL. That renders the board in #C0C0C0 silver with hard 3D bevels, the red LCD mine counter and the smiley reset button, which is a much better match for a Geocities-style layout than the default look.
Do I need HTTPS on my site for this to work?
Neocities serves every yoursite.neocities.org subdomain over HTTPS by default, so there is nothing to configure. Even on a custom domain without a certificate the game still loads, because browsers allow a secure frame inside an insecure page — it is the other direction that gets blocked.
Get your embed code

Everything on this page starts with a snippet from the generator: a game frame plus a one-line credit link that goes under it. Pick a board size and theme, decide whether to show the optional "Powered by" line inside the game, then copy the code.

Open the Minesweeper embed generator