Embed Mahjong Solitaire on Your Website or Blog

Embed Mahjong Solitaire on Your Website or Blog

We are happy to introduce a new feature onTheMahjong.com. From now on, you can embed our Mahjong Solitaire game directly into your own website or blog. Whether you run a small personal blog, a gaming portal, or a page about puzzles and brain training, your visitors can now play Mahjong Solitaire right on your site.

In this article, we’ll explain how the new embed feature works, who it’s designed for, and how you can add a Mahjong Solitaire game to your site.

Why we added the embed feature

Mahjong Solitaire is a natural match for different types of content — guides about puzzles, themed articles, pages about memory and attention, or simple collections of layouts. In these cases, having the game right on the page works better than linking out to a separate site.

The embed feature makes this possible without changing how your site is built. It works like a small, self-contained game block that becomes part of your page where you need it. You only add a small snippet to the page, and we take care of the rest: the game loads from our servers, stays up to date, and works the same way it does on TheMahjong.com.

Two ways to embed Mahjong Solitaire

shared-mahjong-game-example.webp

There are two simple ways to add Mahjong Solitaire to your pages:

  • iframe, which works on almost any website,
  • oEmbed, which is supported by many popular contanagement systems (CMS).

Both options show the same game. The difference is only in how you add it to your page.

Option 1: Simple iframe embed

The iframe option gives you a short HTML snippet that you can paste into your page. This works well if you can edit your site’s HTML, or if your editor has a block for custom code.

A typical iframe embed looks like this:

<iframe 
  src="https://themahjong.com/shared-game" 
  title="Mahjong game" 
  loading="lazy" 
  allowFullScreen 
  style="width:100%;height:600px;border:none">
</iframe>

You can:

  • place this block where you want the game to appear;
  • adjust the width in percent so the game adapts to the width of the container;
  • adjust the height in pixels to match the layout of your page.

If you’d like to support TheMahjong.com, you can add a small text link back to our site near the embedded game. It’s not required, but always appreciated.

Option 2: oEmbed for CMS platforms

If your site runs on a CMS that supports oEmbed (for example, WordPress, Drupal, or Joomla with the right plugins), you can use the embed feature without working directly with iframe HTML.

Every share game page has the layout URL and the oEmbed code.

Some editors can turn the layout URL into an embedded game automatically. You just paste the URL into a block that supports embedded content. Other setups may ask you to paste the oEmbed code into a special field or block provided by a theme or plugin.

If your CMS shows only a normal link instead of the game, it most likely means oEmbed is not enabled or not supported in that part of the editor.

Where embedding works especially well

Embedding makes the most sense on pages where the game supports the topic rather than distracts from it. Here are a few places where a Mahjong Solitaire block can work especially well:

  • Themed blog posts and articles. If you write about puzzles, relaxing games, focus, or daily breaks, an embedded Mahjong Solitaire layout can sit next to the text as a small interactive example. You can pick a layout that loosely matches the topic, so the game doesn’t feel random on the page.
  • Game and puzzle sections on a website. On sites that already have a “Games” or “Puzzles” section, an embedded mahjong game can be one of the main elements on the page instead of just a link. This works both for small personal projects and for larger portals that want to add another classic puzzle without building it from scratch.
  • Pages about memory, attention, and training. Articles that talk about concentration, pattern recognition, or simple daily brain exercises can benefit from a playable example. Mahjong Solitaire fits well as a low-pressure activity that readers can try immediately, without installing anything or leaving the page.
  • Seasonal or event-based pages. For seasonal content (autumn themes, winter holidays, local festivals), you can embed layouts that match the mood of the page. For example, a layout with a zodiac sign for your daily astrological forecast. A themed layout near the main text helps the page feel more complete and gives visitors a reason to stay a bit longer.
  • Community hubs and “take a break” pages. Some communities, forums, or team sites have a simple “take a break” or “play for a minute” page. An embedded Mahjong Solitaire layout fits naturally there as a small, self-contained activity that doesn’t require registration or downloads.

Performance and loading

The embedded game is loaded over HTTPS from TheMahjong.com. It uses the same code and assets as the main site, so performance is similar: once the game is cached, layouts should load quickly on repeat visits.

If you embed the game using the loading="lazy" attribute in the iframe, most browsers will wait to load it until the player scrolls near it. This can help your page stay responsive, especially if you have more than one embed on the same page.

We hope this new embed feature will find a good place on your site. Whether you use it in a single article or as part of a games section, feel free to experiment with different layouts and placements until it fits your content naturally.

Other Mahjong News

  • Mahjong Table Manners: Etiquette Every Player Should KnowMahjong Table Manners: Etiquette Every Player Should Know

    Mahjong Table Manners: Etiquette Every Player Should Know

  • Mahjong Defense Fundamentals: From Beginner to Expert  Mahjong Defense Fundamentals: From Beginner to Expert

    Mahjong Defense Fundamentals: From Beginner to Expert

  • Mahjong for Beginners: 10 Common Mistakes to AvoidMahjong for Beginners: 10 Common Mistakes to Avoid

    Mahjong for Beginners: 10 Common Mistakes to Avoid

  • Mahjong and Memory Training: Evidence from Recent ResearchMahjong and Memory Training: Evidence from Recent Research

    Mahjong and Memory Training: Evidence from Recent Research

Try out the Mahjong gameplay practices on TheMahjong.com

Playing Mahjong at TheMahjong.com offers not just an interesting and exciting pastime, but also an excellent way to improve cognitive skills. Here, you can refine your logical thinking, planning, and visual perception. We invite you to discover this unique world of Mahjong Solitaire and dive into an exciting adventure at TheMahjong.com!