Division Symbol

Division Symbol HTML Code

Write ÷ in HTML as ÷ or ÷. This page lists the matching CSS, JavaScript, Python and URL codes and the entities for every related symbol.

Updated 2026-11-25

All the codes for ÷

The division sign is Unicode U+00F7 (decimal 247). Every one of these produces ÷:

ContextCode
HTML named entity÷ (HTML5 also accepts ÷)
HTML decimal÷
HTML hex÷
CSS content"\00F7" (or "\F7 " with a space)
JavaScript / JSON / Java / C#"\u00F7"
JavaScript (ES2015+)"\u{F7}" · String.fromCodePoint(247)
Python 3"\u00f7" · "\N{DIVISION SIGN}" · chr(247)
URL encoding%C3%B7
UTF-8 bytesC3 B7
UTF-1600F7
The character itself÷ (fine in any UTF-8 page)

If your page declares <meta charset="utf-8"> (every modern page should), you can simply type or paste ÷ into the HTML. Entities are only needed when your editor or pipeline cannot handle non-ASCII characters.

Codes for related division symbols

SymbolNameUnicodeNamed entityNumericCSS
÷Division signU+00F7&divide;&#247;\00F7
∕Division slashU+2215—&#8725;\2215
⁄Fraction slashU+2044&frasl;&#8260;\2044
/SolidusU+002F&sol;&#47;\2F
⟌Long divisionU+27CC—&#10188;\27CC
➗Heavy division signU+2797—&#10135;\2797
∶RatioU+2236&ratio;&#8758;\2236
∣DividesU+2223&mid;&#8739;\2223
∤Does not divideU+2224&nmid;&#8740;\2224
⋇Division timesU+22C7&divonx;&#8903;\22C7
⊘Circled division slashU+2298&osol;&#8856;\2298
⨸Circled division signU+2A38&odiv;&#10808;\2A38

Entity names are from the HTML standard's named character list. What each symbol means is explained on the division symbol page and in ÷ vs / vs ∕ vs ⁄.

Examples

HTML

<p>84 &divide; 4 = 21</p>
<p>84 &#247; 4 = 21</p>

CSS (icon or label before an element)

.divide::before {
  content: "\00F7";
}

In CSS, a hex escape ends at the first non-hex character, or after six digits; writing all four digits (\00F7) or adding a trailing space avoids eating the next character.

JavaScript

const sign = "\u00F7";              // "÷"
el.textContent = `84 ${sign} 4 = ${84 / 4}`;   // "84 ÷ 4 = 21"
"÷".codePointAt(0);               // 247

Note that the calculation still uses /: ÷ is only for display. Division operators in JavaScript, Python and other languages are compared on division in programming.

MathML

<math><mn>84</mn><mo>÷</mo><mn>4</mn></math>

Common mistakes

  • Missing semicolon: &divide without ; happens to work in browsers for legacy reasons, but always close entities.
  • Double escaping: &amp;divide; shows the literal text "&divide;" instead of ÷. This often happens when a CMS escapes an entity a second time.
  • Wrong CSS escape: content: "&divide;" does not work; CSS uses backslash escapes, not HTML entities.
  • Using ÷ as an operator: 84 ÷ 4 in JavaScript is a syntax error.

Writing for print instead? See the LaTeX and Word guides.

Frequently asked questions

What is the HTML code for the division symbol?

Use &divide; or &#247; (hex &#xF7;). All three display ÷.

What is the CSS code for ÷?

Use content: "\00F7"; in a ::before or ::after rule.

How do I write ÷ in JavaScript?

Use the escape "\u00F7" or String.fromCodePoint(247), or type ÷ directly in a UTF-8 file. For the calculation itself use /.

Is there an HTML entity for the long division symbol?

No named entity exists for ⟌. Use the numeric reference &#10188; or &#x27CC;.

What is the HTML entity for "divides" ∣?

&mid; (or &#8739;) gives ∣, and &nmid; gives ∤ (does not divide).