开发者

HTML Code for text checkbox ''

开发者 https://www.devze.com 2023-01-22 13:47 出处:网络
Is there an HTML code for the text checkbox \'\'? EDIT: So to be clear, I need the 开发者_JS百科HTML Number for the symbol , not the form element checkbox.U+F0FE  is not a checkbox, it\'s a Pri

Is there an HTML code for the text checkbox ''?

EDIT: So to be clear, I need the 开发者_JS百科HTML Number for the symbol , not the form element checkbox.


U+F0FE is not a checkbox, it's a Private Use Area character that might render as anything. Whilst you can certainly try to include it in an HTML document, either directly in a UTF-8 document, or as a character reference like , you shouldn't expect it to render as a checkbox. It certainly doesn't on any of my browsers—although on some the ‘unknown character’ glyph is a square box that at least looks similar!

So where does U+F0FE come from? It is an unfortunate artifact of Word RTF export where the original document used a symbol font: one with no standard mapping to normal unicode characters; specifically, in this case, Wingdings. If you need to accept Word RTF from documents still authored with symbol fonts, then you will need to map those symbol characters to proper Unicode characters. Unfortunately that's tricky as it requires you to know the particular symbol font and have a map for it. See this post for background.

The standardised Unicode characters that best represent a checkbox are:

  • , U+2610 Ballot box
  • , U+2611 Ballot box with check

If you don't have a Unicode-safe editor you can naturally spell them as ☐ and ☑.

(There is also U+2612 using an X, .)


This will do:

▢

It is ▢
(known as a "WHITE SQUARE WITH ROUNDED CORNERS" on fileformat.info)

Or

◻

as ◻
(known as a "WHITE MEDIUM SQUARE" on the same website)

Two with shadow:

❏
❑

as ❏ and ❑ . The difference between them is the shadows' shape. You can see it if you zoom in or if you print it out. (They are known as "LOWER RIGHT DROP-SHADOWED WHITE SQUARE" and "LOWER RIGHT SHADOWED WHITE SQUARE", respectively).

You can also use

☐

which is ☐
(known as a "BALLOT BOX").

A sample is at http://jsfiddle.net/S2QCt/267/

(a note: on the Mac, ▢ is quite nice, because it is bigger and somewhat more elegant than ☐ On Windows, ☐ looks more standard, while ▢ is somewhat small.)


Use the Unicode Character

✔   =   ✔



this is a character . You can do copy/past without problem


I have compiled a list of all special square characters that are mentioned here, and more checkbox characters:

Unicode-Nr. HTML-Code Zeichen Offizieller Name Beschreibung
U+00058 (88) X, X X LATIN CAPITAL LETTER X Großer Buchstabe X
U+237B (9083) ⍻ NOT CHECK MARK Durchgestrichenes Häkchen
U+2573 (9587) ╳ LIGHT DIAGONAL CROSS Dünnes diagonales Kreuz
U+25A1 (9633) □, □ WHITE SQUARE Weißes Quadrat
U+25A2 (9634) ▢ WHITE SQUARE WITH ROUNDED CORNERS abgerundetes Quadrat
U+25FB (9723) ◻ WHITE MEDIUM SQUARE mittleres Kästchen
U+2610 (9744) ☐ BALLOT BOX (1) Kästchen (für Wahl, Stimmzettel)
U+2611 (9745) ☑ BALLOT BOX WITH CHECK (1) Abgehaktes Kästchen
U+2612 (9746) ☒ BALLOT BOX WITH X (1) Angekreuztes Kästchen
U+2613 (9747) ☓ SALTIRE Andreaskreuz
U+26DD (9949) ⛝ SQUARED SALTIRE (2) Quadrat-Andreaskreuz
U+26F6 (9974) ⛶ SQUARE FOUR CORNERS (2) abgerundete Quadratecken
U+2705 (9989) ✅ WHITE HEAVY CHECK MARK Weißes fettes Häkchen
U+2713 (10003) ✓, ✓ CHECK MARK Häkchen
U+2714 (10004) ✔ HEAVY CHECK MARK Fettes Häkchen
U+2715 (10005) ✕ MULTIPLICATION X Kreuzchen als Malzeichen für Multiplikation
U+2716 (10006) ✖ HEAVY MULTIPLICATION X fettes Kreuzchen als Malzeichen
U+2717 (10007) ✗, ✗ BALLOT X Kreuzchen (wörtl. „Wahlkästchen-X“)
U+2718 (10008) ✘ HEAVY BALLOT X Fettes Kreuzchen
U+274C (10060) ❌ CROSS MARK Kreuzzeichen
U+274E (10062) ❎ NEGATIVE SQUARED CROSS MARK Negatives Kreuzzeichen im Quadrat
U+274F (10063) ❏ LOWER RIGHT DROP-SHADOWED WHITE SQUARE Weißes Quadrat unten rechts abgetrennt schattiert
U+2A2f (10799) ⨯, ⨯ BALLOT X Kreuzchen (wörtl. „Wahlkästchen-X“)
U+1F5F8 (128504) 🗸
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号