Infinity symbol with HTML

HtmlHtml EntitiesInfinity

Html Problem Overview


How can I display an infinity symbol (like the one in the picture) using HTML?

https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/Infinite.svg/200px-Infinite.svg.png" height="80" alt="infinity symbol" />

Html Solutions


Solution 1 - Html

Use the HTML entity ∞ or ∞.

Solution 2 - Html

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.

Solution 3 - Html

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.

Solution 4 - Html

From Wikipedia:

∞

Solution 5 - Html

Solution 6 - Html

According to this page, it's ∞.

Solution 7 - Html

∞

Solution 8 - Html

Like ЯegDwight said, you can use the HTML entity ∞ 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';
}

Solution 9 - Html

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 &#8734; </p>
<p>The html symbol is &#x221E; </p>
<p>The html symbol is &infin; </p>

Reference : HTML Symbols - HTML Infinity Symbol

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser94154View Question on Stackoverflow
Solution 1 - HtmlЯegDwightView Answer on Stackoverflow
Solution 2 - HtmlGumboView Answer on Stackoverflow
Solution 3 - HtmlMatthew FlaschenView Answer on Stackoverflow
Solution 4 - HtmlbradView Answer on Stackoverflow
Solution 5 - HtmlartlungView Answer on Stackoverflow
Solution 6 - HtmlFrustratedWithFormsDesignerView Answer on Stackoverflow
Solution 7 - HtmlGregoireView Answer on Stackoverflow
Solution 8 - HtmlKaiden PrinceView Answer on Stackoverflow
Solution 9 - HtmlMallikarjun MView Answer on Stackoverflow