HTML Entity for Question Mark (?)

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

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

Unicode U+003F

Basic Latin (ASCII)

Hex Code ?

Hexadecimal reference

HTML Code ?

Decimal reference

Named Entity ?

Semantic named entity

Reference Table
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)
1

Complete HTML Example

A simple example showing ? using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point::after{
   content: "\3F";
  }
 </style>
</head>
<body>
<p>Hex: &#x3F;</p>
<p>Decimal: &#63;</p>
<p>Named: &quest;</p>
<p>CSS: <span id="point"></span></p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The question mark is universally supported—it is part of ASCII and renders in every browser:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android All
iOS Safari All

👀 Live Preview

See ? rendered live in different contexts:

Glyph ?
FAQ label Need help? Contact support.
Compare ? standard   ¿ inverted   ⁈ question over !
Quiz What is 2 + 2?
Numeric refs &#x3F; &#63; &quest; \3F

🧠 How It Works

1

Hexadecimal Code

&#x3F; uses the Unicode hexadecimal value 3F to display the question mark.

HTML markup
2

Decimal HTML Code

&#63; uses the decimal Unicode value 63 to display the same character.

HTML markup
3

CSS Entity

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

CSS stylesheet
4

Named Entity

&quest; is the semantic named entity—the easiest to read in source HTML for question marks.

HTML markup
=

Same visual result

All four methods produce: ?. Unicode U+003F in Basic Latin (ASCII).

Use Cases

The question mark (?) commonly appears in:

❓ FAQs

Frequently asked questions sections and accordion headers.

💡 Help Tooltips

Info icons, hover hints, and onboarding prompts.

📝 Forms

Optional field labels, validation messages, and surveys.

🎓 Quizzes

Educational apps, trivia games, and test questions.

💻 Dev Docs

API references, entity tutorials, and encoding guides.

💬 Chat UIs

Suggested replies, bot prompts, and search placeholders.

♿ Accessibility

Pair ? with descriptive text; avoid icon-only help buttons.

💡 Best Practices

Do

  • Prefer &quest; 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 \3F inside 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 \u003F or '?' instead)

Key Takeaways

1

Three HTML references plus a named entity render ?

&#x3F; &#63; &quest;
2

For CSS stylesheets, use the escape in the content property

\3F
3

Unicode U+003F is QUESTION MARK in Basic Latin (ASCII)

4

&quest; is the readable named entity for ?

❓ Frequently Asked Questions

Use &#x3F; (hex), &#63; (decimal), &quest; (named entity), or \3F in CSS content. All produce ?.
U+003F (QUESTION MARK). Basic Latin block. Hex 3F, decimal 63.
&quest; is the named HTML entity for ? (U+003F). It is the most readable option in source markup.
Usually no—you can type ? directly in HTML text. Use &quest; or numeric codes when encoding matters, in tutorials, or inside generated markup.
In FAQs, help tooltips, quiz UIs, form labels, accessibility demos, and entity reference pages.

Explore More HTML Entities!

Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, 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