Smart Quotes in HTML and Markdown
How to insert typographic quotes in HTML, Markdown, and CMS editors — with keyboard shortcuts.
Published:
Tags: smart quotes HTML, curly quotes HTML entities, typographic quotes web
Smart Quotes in HTML and Markdown The smart quote characters are defined in the Unicode Standard as U+201C, U+201D, U+2018, and U+2019. The HTML5 Named Character References specification defines , , , and as the standard HTML entities. Typographic quotes — "like this" and 'like this' — are distinct Unicode characters from the straight ASCII variants. This guide covers how to insert them in HTML, Markdown, and CMS editors, and how to automate the conversion. --- Smart Quote Characters and Their HTML Entities | Character | Code Point | Named Entity | Numeric Entity | Name | |-----------|------------|-------------|----------------|------| | " | U+201C | “ | “ | Left Double Quotation Mark | | " | U+201D | ” | ” | Right Double Quotation Mark | | ' | U+2018 | ‘ |…
Frequently Asked Questions
How do I add smart quotes to HTML?
In UTF-8 HTML, paste the characters directly or use named entities “text” or numeric references “text”. Modern HTML5 with charset=UTF-8 supports direct embedding of any Unicode character. Named entities (“, ”, ‘, ’) are the safest fallback for legacy contexts.
What is the HTML entity for an em dash?
The em dash (U+2014) HTML entity is — or — or —. The en dash (U+2013) is – or – or –. In UTF-8 HTML, you can embed these characters directly without escaping. Named entities are useful when you cannot trust the document encoding.
How do I use smart quotes in Markdown?
Most Markdown processors include a SmartyPants-style typographer that automatically converts straight quotes to curly during rendering. In Hugo, set smartypants = true in config. In Jekyll, use kramdown with smart_quotes enabled. In Pandoc, use the --smart flag.
How do I enable smart quotes in a CMS?
WordPress applies smart quotes automatically via the wptexturize() function. Craft CMS applies them via the Redactor editor. Ghost applies typographic transforms on publish. In custom CMSes, run text content through a SmartyPants library before storage or display.
What is the “ HTML entity?
“ is the HTML named character reference for LEFT DOUBLE QUOTATION MARK (U+201C). The corresponding closing entity is ” (U+201D). These are defined in HTML 4 and HTML 5 and produce the same result as “ and ”.
All articles · theproductguy.in