HTML Entity for Uppercase O (O)

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

What You'll Learn

How to display the uppercase letter O in HTML using entity methods. The letter O is the fifteenth letter of the Latin alphabet (U+004F) and is part of the Basic Latin block. In most cases you can type it directly; numeric or CSS entities are useful when escaping, generating content via CSS, or ensuring correct encoding.

This character can be displayed using the character itself, a hexadecimal reference, a decimal reference, or a CSS escape in the content property. There is no named HTML entity like &O; for this letter.

⚡ Quick Reference — Uppercase O Entity

Unicode U+004F

Basic Latin (ASCII)

Hex Code O

Hexadecimal reference

HTML Code O

Decimal reference

Direct Character O

Type directly (no named entity)

Reference Table
Name           Value
────────────   ──────────
Unicode        U+004F
Hex code       O
HTML code      O
Named entity   (none — use O directly)
CSS code       \4F
Meaning        Latin capital letter O
Related        U+006F = o (lowercase)
Block          Basic Latin (U+0000–U+007F)
1

Complete HTML Example

A simple example showing the uppercase letter O using hexadecimal code, decimal HTML code, the character directly, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\4F";
  }
 </style>
</head>
<body>
<p>Symbol (hex): &#x4F;</p>
<p>Symbol (decimal): &#79;</p>
<p>Symbol (direct): O</p>
<p id="point">Symbol (CSS): </p>
</body>
</html>
Try It Yourself

🌐 Browser Support

The uppercase letter O (U+004F) is universally supported in all browsers and platforms as part of Basic Latin:

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

👀 Live Preview

See the uppercase letter O in common text contexts:

Large glyphO
Body textThe letter O follows N in the alphabet.
LabelOption O: fifteenth choice
AlphabetN O P Q R
Numeric refs&#x4F; &#79; \4F

🧠 How It Works

1

Hexadecimal Code

&#x4F; uses the Unicode hexadecimal value 4F to display the letter. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

&#79; uses the decimal Unicode value 79 to display the same character. This is the ASCII/Unicode decimal for O.

HTML markup
3

Direct Character

Type O directly in HTML. There is no named entity like &O;; the character itself is the standard approach in body text.

HTML markup
4

CSS Entity

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

CSS stylesheet
=

Same visual result

All methods produce the glyph: O. Unicode U+004F sits in Basic Latin. The lowercase form is U+006F (o). In normal text, typing O is preferred.

Use Cases

The uppercase letter O (or its entity forms) is commonly used in:

📝 Body text

Standard character in paragraphs, articles, and any Latin-script text. Usually typed directly.

🏷 Labels & attributes

Use in ARIA labels, alt text, placeholders, and attribute values; numeric entities help when escaping is needed.

🎨 Typography & design

Reference in font specs, CSS content, or generated text via CSS entities.

🔤 Alphabet & education

Teaching the alphabet, phonics, or character encoding; entity codes clarify the exact character.

⚙ Code & scripts

When building HTML or strings programmatically, numeric entities ensure correct output.

🌐 Internationalization

Part of Basic Latin used across languages; entities can help in legacy encoding contexts.

📋 Lists & counters

CSS content or list-style may use the character via entity for styling.

💡 Best Practices

Do

  • Type O directly in body content; use entities only when necessary
  • Serve pages as UTF-8 so Basic Latin characters render without entities
  • Use numeric references (&#x4F; or &#79;) when escaping is required
  • Use \4F in CSS content when generating the letter via pseudo-elements
  • Remember uppercase O is U+004F and lowercase o is U+006F when case matters

Don’t

  • Overuse numeric entities for O in normal readable text
  • Expect a named HTML entity like &O;—none exists for this letter
  • Put CSS escape \4F in HTML text nodes
  • Use padded Unicode notation like U+0004F—the correct value is U+004F
  • Use \0004F in CSS—the correct escape is \4F

Key Takeaways

1

Type O directly, or use hex/decimal references

&#x4F; &#79;
2

For CSS stylesheets, use the escape in the content property

\4F
3

Unicode U+004F — LATIN CAPITAL LETTER O

4

Fifteenth letter of the Latin alphabet (Basic Latin block)

❓ Frequently Asked Questions

Type O directly, or use &#x4F; (hex), &#79; (decimal), or \4F in CSS content. For most content, typing O is standard; use numeric or CSS entities when escaping or generating via CSS.
U+004F (LATIN CAPITAL LETTER O). Basic Latin block. Hex 4F, decimal 79. It is the fifteenth letter of the Latin alphabet.
Use numeric or CSS entities when escaping in attributes or special contexts, generating content in CSS ::before/::after, ensuring encoding in legacy systems, or building strings programmatically. In normal body text, typing O is preferred.
HTML code (&#79; or &#x4F;) is used in HTML content or attributes. The CSS entity (\4F) is used in CSS, e.g. in the content property of pseudo-elements. Both produce O but in different contexts.
No. In UTF-8 documents you can type O directly. HTML entities are more useful for CSS content properties, programmatic generation, or when explicit encoding is required. Understanding entity codes for basic letters helps with education and tooling.

Explore More HTML Entities!

Discover 1500+ HTML character references — letters, 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