What is the unicode character for the close symbol used by Twitter bootstrap?

right answer today: × used in close buttons


The multiplication sign ( × ) was a bit too small for what I wanted and increasing the font size broke other things, so I found these larger alternatives:

✕ Multiplication X (U+2715)

  • Decimal HTML entity: ✕
  • Hex HTML entity: ✕

✖ Heavy Multiplication X (U+2716)

  • Decimal HTML entity: ✖
  • Hex HTML entity: ✖

❌ Cross Mark (U+274C)

  • Decimal HTML entity: ❌
  • Hex HTML entity: ❌

I hope these will save somebody some time.


It uses ×.

You can use the following to obtain the desired information about any character:

$ perl -Mcharnames=:full -CA -e'
   printf("U+%04X %s\n", $_, charnames::viacode($_))
      for unpack "W*", $ARGV[0];
' ×
U+00D7 MULTIPLICATION SIGN

If you're going to use it in HTML, you can encode it as follows:

$ perl -MHTML::Entities -CA -e'
   CORE::say encode_entities($ARGV[0]);
' ×
×

Notes:

  • The above programs expect the argument to be encoded using UTF-8.
  • The line breaks can be removed to make true one-liners.

If you don't want to use Unicode, you can simply use the HTML character entity ×.