Black Square

Shortcodes

Copy and paste codes for Black Square symbol ■ to use in your websites, apps, blogs, and more.

Unicode
U+25A0
HTML Code
■
HEX Code
■
CSS Code
\25A0
JS/JSON
\u25A0
Unix/C/PHP/JAVA
0x25A0
URL-encode
%E2%96%A0
copied

Customize Black Square Symbol

Customize ■ symbol as you like and download Black Square as SVG or PNG or copy its HTML code to use in your projects.

Preview helps customize symbol. Downloaded image and HTML code may have size/spacing differences.

                        
                    

How to add Black Square symbol in HTML, CSS, and JS?

Insert ■ Black Square using HTML

1. Copy-paste Black Square directly:
<span>■</span>
2. HTML Decimal Code:
<span>&#9632;</span>
3. Hexadecimal Code:
<span>&#x25A0;</span>
Preview:

Add Black Square symbol with CSS

.black-square::before {
    content: '\\25A0';
}
Preview: Black Square

Black Square JavaScript Code

1. Direct Symbol:
document.querySelector('.black-square').textContent = '■';
2. Unicode Escape for ■:
document.querySelector('.black-square').textContent = '\u25A0';
Preview: