Chess positions

A fen code block containing a FEN string is rendered into an SVG chessboard at build time. No JavaScript, no external library in the browser. The side to move always sits at the bottom — the small circle next to it shows the same thing, and the button opens the position in Lichess’s analysis tool. An optional “Load engine” button below each board runs Stockfish in your browser on demand.

Starting position

White to move, so at the bottom:

87654321abcdefgh

After 1.e4 — Black to move

The board flips automatically, Black now sits at the bottom:

12345678hgfedcba

A famous checkmate

The “Scholar’s mate”, White to move:

87654321abcdefgh

Pinned manually

white or black after the language tag forces a fixed orientation, regardless of whose move it is — here the same position from Black’s side:

12345678hgfedcba