Embedding a game in your own website

Sort:
Sozus

Hello,

Is there a way to embed a game into your own site? Like you can do with a youtube movie... ?

Thanks

TheGrobe

Great idea -- and also great exposure for chess.com should they choose to implement it.

TheGrobe

I think the suggestion was for the ability to do it on an external site as opposed to a profile or forum topic within chess.com.

Sozus

Indeed :-) Like on social networks you can often add certain gadgets like this.

erik

awesome idea. not yet possible.

Charlie91

Try going to www.chesspublisher.com.  You have to register there.  Just get the PGN and it's easy.  There are many other ways of doing this (using javascript, etc.).

Sozus

Yes with png's it would be possible ... but if chess.com itself would make this possible it might get popular sooner because it would be easy for everyone.

rylansharma
Sozus wrote:

Hello,

Is there a way to embed a game into your own site? Like you can do with a youtube movie... ?

Thanks

Yes, it's possible to embed a game on your website in a similar way to embedding a YouTube video. You can use the <iframe> tag to embed the game, just like you would with a video. Many game developers provide embed codes or URLs that you can directly integrate into your website.

Here's how it generally works:

Get the Embed Code or URL: Many online game platforms offer embed codes or URLs for their games. These are usually found within the game's sharing or embedding options.

Locate the <iframe> Tag: In your website's HTML, find the location where you want the game to appear.

Insert the <iframe> Tag: Paste the embed code or URL into the src attribute of the <iframe> tag.

Adjust Size and Appearance: You can modify the width and height attributes of the <iframe> to adjust the game's size on your page.

Test: Make sure the game displays correctly and functions as expected.

For example, a simple embed might look like this:

Code

<iframe src="" width="600" height="400"></ifram