HTML Entity for Uppercase P Script Capital (℘)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+2118

What You'll Learn

How to display the script capital P (℘) in HTML using named entity, hexadecimal, decimal, and CSS escape methods. This character is part of the Letterlike Symbols block and is widely used in mathematics to denote the Weierstrass elliptic function. Its official Unicode name is SCRIPT CAPITAL P (U+2118).

Render it with ℘, ℘, ℘, or CSS escape \2118. The named entity ℘ is often the most readable option in HTML source. Do not confuse ℘ with plain P (U+0050), ℙ (double-struck), or Ƥ (P hook).

⚡ Quick Reference — Uppercase P Script Capital Entity

Unicode U+2118

Letterlike Symbols

Hex Code ℘

Hexadecimal reference

HTML Code ℘

Decimal reference

Named Entity ℘

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+2118
Hex code       ℘
HTML code      ℘
Named entity   ℘
CSS code       \2118
Meaning        Script capital P (Weierstrass function)
Not the same   U+0050 = P (plain uppercase)
Related        U+2119 = ℙ (double-struck) U+01A4 = Ƥ (hook)
Block          Letterlike Symbols (U+2100–U+214F)
1

Complete HTML Example

A simple example showing the script capital P (℘) using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\2118";
  }
 </style>
</head>
<body>
<p>Symbol (hex): &#x2118;</p>
<p>Symbol (decimal): &#8472;</p>
<p>Symbol (named): &weierp;</p>
<p id="point">Symbol (CSS): </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The script capital P (℘) and the named entity &weierp; are supported in modern browsers when UTF-8 is used:

Chrome1+
Firefox1+
Safari1+
Edge12+
Opera4+
Android4.4+
iOS Safari1+

👀 Live Preview

See the script capital P (℘) in mathematical and typographic contexts:

Large glyph
Math useWeierstrass function: ℘(z; g₂, g₃)
Named entity&weierp; renders as ℘
Not the same asplain P (U+0050)  |  (double-struck)  |  Ƥ (hook)
Numeric refs&#x2118; &#8472; &weierp; \2118

🧠 How It Works

1

Hexadecimal Code

&#x2118; uses the Unicode hexadecimal value 2118 to display the script capital P. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

&#8472; uses the decimal Unicode value 8472 to display the same character. A common method for Letterlike Symbols.

HTML markup
3

Named Entity

&weierp; is the standard named entity for ℘—readable in source HTML and semantically tied to the Weierstrass elliptic function.

HTML markup
4

CSS Entity

\2118 is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.

CSS stylesheet
=

Same visual result

All four methods produce the glyph: . Unicode U+2118 sits in Letterlike Symbols. Do not confuse with plain P (U+0050), ℙ (double-struck), or Ƥ (P hook).

Use Cases

The script capital P (℘) is commonly used in:

📐 Mathematical notation

Weierstrass elliptic function notation in advanced mathematics and analysis.

🔢 Complex analysis

Elliptic functions, complex variables, and related theoretical mathematics.

📄 Academic papers

Research papers, theses, and journal articles in mathematics and physics.

🔬 Scientific docs

Technical documentation involving elliptic curves and Weierstrass equations.

📚 Education

University courses and textbooks teaching complex analysis and elliptic functions.

🌐 Web publishing

Scientific blogs and online math resources that need proper ℘ rendering.

📝 Technical writing

Developer guides and documentation explaining mathematical APIs involving elliptic functions.

💡 Best Practices

Do

  • Use &weierp; in HTML when possible for readability and semantic meaning
  • Serve pages as UTF-8; you can also type ℘ directly in UTF-8 source
  • Use math-friendly fonts (e.g. Cambria Math, STIX) for reliable script glyph display
  • Distinguish ℘ from plain P, ℙ (double-struck), and Ƥ (hook)
  • Pick one entity style (named, hex, or decimal) per project for consistency

Don’t

  • Substitute plain P when ℘ is required for Weierstrass notation
  • Confuse ℘ (script P) with ℙ (double-struck) or Ƥ (P hook)
  • Put CSS escape \2118 in HTML text nodes
  • Use \02118 in CSS—the correct escape is \2118
  • Assume all fonts render Letterlike Symbols identically

Key Takeaways

1

Four references render ℘; named entity is most readable

&#x2118; &#8472; &weierp;
2

For CSS stylesheets, use the escape in the content property

\2118
3

Unicode U+2118 — SCRIPT CAPITAL P (Weierstrass function)

4

Essential for complex analysis, elliptic functions, and advanced mathematics

❓ Frequently Asked Questions

Use &weierp; (named), &#x2118; (hex), &#8472; (decimal), or \2118 in CSS content. The named entity &weierp; is the most readable for HTML content.
U+2118 (SCRIPT CAPITAL P). Letterlike Symbols block. Hex 2118, decimal 8472. Commonly used to denote the Weierstrass elliptic function.
In mathematical notation for the Weierstrass elliptic function, complex analysis, elliptic curves, academic papers, scientific documentation, and educational content on advanced mathematics.
HTML code (&#8472; or &#x2118;) or the named entity &weierp; is used in HTML content. The CSS entity (\2118) is used in CSS, e.g. in the content property of pseudo-elements. Both produce ℘ but in different contexts.
Yes. The named HTML entity is &weierp;. It is part of the standard HTML5 entity set and is well supported. Do not confuse with plain P (U+0050), ℙ (double-struck, U+2119), or Ƥ (P hook, U+01A4).

Explore More HTML Entities!

Discover 1500+ HTML character references — script letters, math symbols, and more.

All HTML Entities →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful