HTML Entity for Question Mark (?)

What You'll Learn
How to display the question mark (?) in HTML using hexadecimal, decimal, named entity, and CSS escape methods. This is one of the most common punctuation marks—used for questions, help prompts, and interactive UI labels.
It is U+003F (QUESTION MARK) in the Basic Latin block (ASCII). Use ?, ?, the named entity ?, or CSS \3F. You can usually type ? directly in HTML, but entities are useful in tutorials, encoded content, and generated markup.
⚡ Quick Reference — Question Mark
U+003FBasic Latin (ASCII)
?Hexadecimal reference
?Decimal reference
?Semantic named entity
Name Value
──────────── ──────────
Unicode U+003F
Hex code ?
HTML code ?
Named entity ?
CSS code \3F
Meaning Question mark (interrogation point)
Related U+00BF = Inverted question mark (¿)
U+2048 = Question exclamation mark (⁈)
U+2047 = Double question mark (⁇)
Block Basic Latin (U+0000–U+007F)Complete HTML Example
A simple example showing ? using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:
<!DOCTYPE html>
<html>
<head>
<style>
#point::after{
content: "\3F";
}
</style>
</head>
<body>
<p>Hex: ?</p>
<p>Decimal: ?</p>
<p>Named: ?</p>
<p>CSS: <span id="point"></span></p>
</body>
</html>🌐 Browser Support
The question mark is universally supported—it is part of ASCII and renders in every browser:
👀 Live Preview
See ? rendered live in different contexts:
🧠 How It Works
Hexadecimal Code
? uses the Unicode hexadecimal value 3F to display the question mark.
Decimal HTML Code
? uses the decimal Unicode value 63 to display the same character.
CSS Entity
\3F is used in CSS stylesheets in the content property of pseudo-elements like ::before and ::after.
Named Entity
? is the semantic named entity—the easiest to read in source HTML for question marks.
Same visual result
All four methods produce: ?. Unicode U+003F in Basic Latin (ASCII).
Use Cases
The question mark (?) commonly appears in:
Frequently asked questions sections and accordion headers.
Info icons, hover hints, and onboarding prompts.
Optional field labels, validation messages, and surveys.
Educational apps, trivia games, and test questions.
API references, entity tutorials, and encoding guides.
Suggested replies, bot prompts, and search placeholders.
Pair ? with descriptive text; avoid icon-only help buttons.
💡 Best Practices
Do
- Prefer
?in entity tutorials for clarity - Use ? directly in normal body text when encoding is not required
- Distinguish ? from ¿ (Spanish inverted question mark)
- Pick one style (named, hex, or decimal) per project
- Add accessible labels on help-icon buttons
Don’t
- Confuse ? with ⁈ (question exclamation mark) or ‽ (interrobang)
- Use CSS escape
\3Finside HTML text nodes - Rely on ? alone for critical help—add visible text
- Over-encode every ? when plain text works fine
- Use HTML entities in JS (use
\u003For'?'instead)
Key Takeaways
Three HTML references plus a named entity render ?
? ? ?For CSS stylesheets, use the escape in the content property
\3FUnicode U+003F is QUESTION MARK in Basic Latin (ASCII)
? is the readable named entity for ?
Previous: Question Exclamation Mark (⁈) Next: Question Mark Big
❓ Frequently Asked Questions
? (hex), ? (decimal), ? (named entity), or \3F in CSS content. All produce ?.U+003F (QUESTION MARK). Basic Latin block. Hex 3F, decimal 63.? is the named HTML entity for ? (U+003F). It is the most readable option in source markup.? directly in HTML text. Use ? or numeric codes when encoding matters, in tutorials, or inside generated markup.Explore More HTML Entities!
Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, and more.
8 people found this page helpful
