HTML Entity for Quotation Mark (")

What You'll Learn
How to display the quotation mark (") in HTML using hexadecimal, decimal, named entity, and CSS escape methods. This is the straight double quote—one of the most important characters for dialogue, citations, and escaping quotes inside HTML attributes.
It is U+0022 (QUOTATION MARK) in the Basic Latin block (ASCII). Use ", ", the named entity ", or CSS \22. The named entity " is especially common when a double quote must appear inside an attribute value delimited by quotes.
⚡ Quick Reference — Quotation Mark
U+0022Basic Latin (ASCII)
"Hexadecimal reference
"Decimal reference
"Standard named entity
Name Value
──────────── ──────────
Unicode U+0022
Hex code "
HTML code "
Named entity "
CSS code \22
Meaning Quotation mark (straight double quote)
Related U+201C = Left double quotation mark (“)
U+201D = Right double quotation mark (”)
U+0027 = Apostrophe (')
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: "\22";
}
</style>
</head>
<body>
<p>Hex: "</p>
<p>Decimal: "</p>
<p>Named: "</p>
<p>CSS: <span id="point"></span></p>
<p>She said "Hello."</p>
</body>
</html>🌐 Browser Support
The quotation 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 22 to display the quotation mark.
Decimal HTML Code
" uses the decimal Unicode value 34 to display the same character.
Named Entity
" is the standard named entity—essential for escaping double quotes inside HTML attribute values.
CSS Entity
\22 is used in CSS stylesheets in the content property of pseudo-elements like ::before and ::after.
Same visual result
All four methods produce: ". Unicode U+0022 in Basic Latin (ASCII).
Use Cases
The quotation mark (") commonly appears in:
Quoted speech, interviews, testimonials, and chat transcripts.
Escaping " inside title, alt, and data-* values.
Blockquotes, pull quotes, and reference snippets in articles.
String literals, JSON examples, and entity tutorials.
Search placeholders, filter chips, and quoted button text.
Plain straight quotes in monospace or technical content.
💡 Best Practices
Do
- Use
"to escape quotes inside double-quoted attributes - Type
"directly in UTF-8 body text when safe - Distinguish straight
"from curly “ / ” for typography - Pick one encoding style (named, hex, or decimal) per project
- Serve pages with UTF-8 (
<meta charset="utf-8">)
Don’t
- Confuse
"with“/”(curly quotes) - Put CSS escape
\22inside HTML text nodes - Mix straight and curly quotes randomly in the same article
- Over-encode every quote when plain UTF-8 text works
- Use HTML entities in JavaScript strings (use
\u0022or'"'instead)
Key Takeaways
Three HTML references plus a named entity render "
" " "For CSS stylesheets, use the escape in the content property
\22Unicode U+0022 is QUOTATION MARK in Basic Latin (ASCII)
" is the standard named entity for escaping double quotes
Previous: Questioned Equal To (≟) Next: Radioactive Sign (☢)
❓ Frequently Asked Questions
" (hex), " (decimal), " (named entity), or \22 in CSS content. All produce the straight double quote.U+0022 (QUOTATION MARK). Basic Latin block. Hex 22, decimal 34." inside HTML attribute values delimited by double quotes, in generated markup, and in tutorials where explicit encoding is shown." is U+0022 (straight ASCII quote). Curly quotes are different characters—for example “ (U+201C) and ” (U+201D) for typographic opening and closing quotes.", ", or ") go in markup. The CSS escape \22 is used in stylesheets, typically in the content property. Same visual result, different layers.Explore More HTML Entities!
Discover 1500+ HTML character references — punctuation, symbols, and more.
8 people found this page helpful
