Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML Code for text checkbox ''

Tags:

html

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

EDIT: So to be clear, I need the HTML Number for the symbol , not the form element checkbox.

like image 525
Thomas Avatar asked Oct 28 '10 10:10

Thomas


People also ask

How do you fill a checkbox in HTML?

HTML Checkbox Checked You can code a checkbox to be pre-selected when the page loads using the checked boolean attribute. You simply have to add the word checked within the opening tag of the input element.

Which tag is used to create a checkbox in HTML?

1 Answer. The correct answer to the question “Which tag creates a checkbox for a form in HTML” is option (b). <input type=″checkbox″>.


1 Answers

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 &#xF0FE;, 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 &#x2610; and &#x2611;.

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

like image 129
bobince Avatar answered Sep 21 '22 02:09

bobince