Fraction one half ½ — HTML code and how to type it

The fraction one half ½ is ½ in HTML and U+00BD in Unicode. Copy any form below, or type it with Alt + 0189 on Windows.

Updated

Character½
HTML named entity½
HTML decimal½
HTML hex½
UnicodeU+00BD
CSS content"\00BD"
JavaScript"\u00BD"
URL encoded%C2%BD
UTF-8 bytesC2 BD

When to use it

A precomposed fraction; for other fractions use ⁄ (fraction slash) or plain 3/8.

In HTML, CSS and JavaScript

<p>&frac12;</p>           <!-- or the character itself in a UTF-8 page -->

.note::before { content: "\00BD"; }

const s = "\u00BD";

In a page saved as UTF-8 (the default today) you can paste the character directly; the entity is only needed when it must survive a non-UTF-8 system. Encode or decode whole texts with the HTML Entity Encoder.

How to type fraction one half

  • Windows: hold Alt and type 0189 on the numeric keypad.
  • Mac: press Ctrl + Cmd + Space and search for “fraction one half”.
  • Linux: Ctrl + Shift + U, then BD and Enter.
HTML Entity EncoderEscape < > & " so text is safe to show in HTML, convert accents and symbols to named or numeric entities, or decode entity-filled HTML back to plain text.
Open the tool

Frequently asked questions

What is the HTML code for the fraction one half?
&frac12; (named), &#189; (decimal) or &#xBD; (hex). All three produce the same character.
What is the Unicode for the fraction one half?
U+00BD. In CSS write "\00BD" and in JavaScript "\u00BD".
How do I type the fraction one half on a keyboard?
On Windows hold Alt and type 0189 on the numpad. On a Mac use Ctrl + Cmd + Space and search for it.