How can I display an infinity symbol (like the one in the picture) using HTML?
9 Answers
Use the HTML entity ∞
or ∞
.

- 24,821
- 10
- 45
- 52
-
1@FranciscoCorralesMorales Well... [googling for `utf-8 infinity symbol`](https://www.google.pl/#q=utf-8+infinity+symbol&safe=active) gives me many interesting results within 3 seconds, including [utf8icons.com](http://www.utf8icons.com/character/8734/infinity), [fileformat.info](http://www.fileformat.info/info/unicode/char/221e/index.htm) and others. – trejder Jun 12 '14 at 11:00
-
@FranciscoCorralesMorales also [MDN](https://developer.mozilla.org) site is very good and increasing in data available. – PhoneixS Jun 25 '14 at 15:07
You can use the following:
- literal:
∞
(if the encoding you use can encode it — UTF-8 can, for example) - character reference:
∞
(decimal),∞
(hexadecimal) - entity reference:
∞
But whether it is displayed correctly does also depend on the font the text is displayed with.

- 96,640
- 56
- 199
- 270

- 643,351
- 109
- 780
- 844
-
17+1 for mentioning the font-dependence. This is often overlooked in case of "unicode characters". – BalusC Feb 12 '10 at 21:02
∞
This does not require a HTML entity if you are using a modern encoding (such as UTF-8). And if you're not already, you probably should be.

- 278,309
- 50
- 514
- 539
-
4Curious: since I don't have a ∞ on my keyboard, would I always have to copy/paste the previous ∞? How do you get it there the first time? I find it easier and faster to type `∞`, but if there's a faster way to get this on to the screen with just a plain ol' keyboard, please share – FrustratedWithFormsDesigner Feb 12 '10 at 21:00
-
4The “Typing Special Characters” section here might help: http://www.xvsxp.com/misc/keyboard.php – Paul D. Waite Feb 12 '10 at 21:07
-
I'm aware of the character maps, but I'm a fast typist and having to toggle to a UI and then back to the editor slows me down. I can still type `∞` faster. – FrustratedWithFormsDesigner Feb 12 '10 at 21:14
-
1I don't think there's a default key for infinity. However, like anything else you can set up a key shortcut. Jonas Kölker recommended Compose+1/0 (http://stackoverflow.com/questions/311244/keyboard-layout-for-international-programmers/662389#662389) – Matthew Flaschen Feb 12 '10 at 21:33
-
3What's your environment? On the Mac, it's option-5. In GTK+, it's C-S-u 2 2 1 E. On Windows, it's ALT 2 3 6 (keypad). A good text editor will also have a way to define an abbrev for it. – Ken Feb 14 '10 at 00:19
According to List of XML and HTML character entity references:
∞

- 30,738
- 21
- 105
- 131

- 33,305
- 16
- 69
- 121
-
1Now this is the first page that comes up when you google the question. – whitebeard Jul 23 '15 at 11:25
According to this page, it's ∞
.

- 9,257
- 11
- 59
- 87

- 26,726
- 31
- 139
- 202
Like ЯegDwight said, you can use the HTML entity &infin
; or ∞
. A easy source of getting these codes, is to look at this entity list.
You can also use them in CSS, which was what I was looking for, just like font-awesome does. A simple CSS based solution would be to have something like:
.infinity-ico:before {
content: '\221E';
}

- 472
- 3
- 18
Infinity is a reserved character in HTML. Following are its values in various forms.
- Hex : 8734
- Decimal : 221E
- Entity : ∞
To use in html code
<p>The html symbol is ∞ </p>
<p>The html symbol is ∞ </p>
<p>The html symbol is ∞ </p>
Reference : HTML Symbols - HTML Infinity Symbol

- 1,645
- 1
- 19
- 19