Apostrophe '
The apostrophe (or straight single quote) is used in contractions, possessives, and as an attribute delimiter in HTML. While ' originated in XML and was not part of HTML 4, it is fully supported in HTML5. For typographic quality, the curly apostrophe ’ is preferred in body text.
All Representations
'''U+0027Rendered Output
' renders as the character shown above
When to Use Apostrophe
Use the apostrophe entity inside single-quoted HTML attribute values and when you need to prevent ambiguity in template strings or JavaScript embedded in HTML. For natural-language text, the right single quotation mark ’ is the typographically correct choice for apostrophes and contractions.
Try It — HTML Examples
<p>Symbol: '</p><p>Symbol: '</p><p>Symbol: '</p><div title="The Apostrophe: '">Hover to see</div>About the Apostrophe Entity
The Apostrophe character (') is a standard HTML entity defined in the HTML specification. In HTML source code, it can be written using the named entity reference ', the decimal numeric character reference ', or the hexadecimal numeric reference '. The character is assigned Unicode code point U+0027 in the Universal Character Set.
The apostrophe (or straight single quote) is used in contractions, possessives, and as an attribute delimiter in HTML. While ' originated in XML and was not part of HTML 4, it is fully supported in HTML5. For typographic quality, the curly apostrophe ’ is preferred in body text.
Punctuation and whitespace entities are among the most frequently used HTML entities in web development. They handle characters that either have special meaning in HTML syntax — such as angle brackets and ampersands — or represent typographic characters that improve the visual quality of text, like em dashes and curly quotes. Proper use of punctuation entities is essential for producing valid, well-formed HTML documents and achieving professional-looking typography on the web.
When deciding how to encode the Apostrophe character in your HTML documents, the named entity ' is generally the most readable choice for developers reviewing or maintaining source code. The decimal form ' and hexadecimal form ' are equally valid alternatives that work in contexts where named entities may not be supported, or when generating HTML output programmatically from server-side code. All three representations produce identical visual output in every modern web browser.
Use the apostrophe entity inside single-quoted HTML attribute values and when you need to prevent ambiguity in template strings or JavaScript embedded in HTML. For natural-language text, the right single quotation mark ’ is the typographically correct choice for apostrophes and contractions.
Related Entities
Explore More HTML Entities
Browse our complete reference of 262 HTML entities with codes, examples, and usage tips.