Chess symbols in Unicode

Chess symbols are part of Unicode. Instead of using images, one can represent chess pieces by symbols that are defined in the Unicode character set. This makes it possible to:

In order to display or print these symbols, one has to have one or more fonts with good Unicode support installed on the computer, and the document (Web page, word processor document, etc.) must use one of these fonts.[1]

Unicode code points and HTML

Chess symbols are part of the Miscellaneous Symbols block.

Chess Symbols
Unicode.org chart (PDF)
NameSymbolCode pointHTML
white chess kingU+2654♔
white chess queenU+2655♕
white chess rookU+2656♖
white chess bishopU+2657♗
white chess knightU+2658♘
white chess pawnU+2659♙
black chess kingU+265A♚
black chess queenU+265B♛
black chess rookU+265C♜
black chess bishopU+265D♝
black chess knightU+265E♞
black chess pawnU+265F♟

Chessboard

8
7
6
5
4
3
2
1
a b c d e f g h

References

  1. "Test for Unicode support in Web browsers".
  • http://js1k.com/2010-first/demo/750 Playable chess in 1024 bytes of javascript. Entry in JS1k competition by Óscar Toledo G. Usage of Unicode Chess symbols enables a playable design and keep the code less than 1024 bytes.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.