Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use proper apostrophes in HTML instead of "dumb quotes"?

In the article Better web typography in a few simple steps, it says

Talking about apostrophes, the correct sign for them is the right single quotation mark. A dead give-away for amateur typography is the presence of straight quotation marks, also called 'dumb quotes' by type-savvy designers.

I've been using these "dumb quotes" all along!

Now, when one is writing regular HTML (and not Markdown, which automatically produces apostrophes), how is one supposed to sanely write correct apostrophes? Am I just supposed to inject ’ wherever a ' would go before? Is there a program that automatically does this?

How do professional web designers take care of this problem?

like image 450
LonelyWebCrawler Avatar asked Feb 25 '13 01:02

LonelyWebCrawler


People also ask

How do you use an apostrophe instead of a single quote?

Single quotes are limited to one real function in written U.S. English, which is to indicate a quotation within a quotation. Apostrophes, on the other hand, are used to denote possessive form and to indicate omission.

How do you write an apostrophe for dumb?

The "dumb" apostrophe To get a proper apostrophe you may have to use a keyboard command. On the Mac it's Option + Shift + ] to get the single closed quotation mark (apostrophe). Use Alt + 0146 on the PC. As you can see from the photo right, sometimes the backward apostrophe gets by the best of them.

Can you use apostrophes instead of quotation marks?

In short, 'yes', you can use the symbol of the apostrophe as a quotation mark, however it is normally used when quoting one or two words rather than full sentences.


1 Answers

You have couple of options here:

  1. As was pointed out before, either use numerical or named HTML entities.
  2. Write your HTML with single apostrophes and then do a search and replace before publishing. This is workable, but could lead to unexpected replacements if you aren’t careful.
  3. Insert the actual single quote using the appropriate keyboard sequence for your operating system: option-shift-] on a Mac or alt-0146 on a PC and make sure to save and serve your HTML as UTF-8 encoded. That way you don't have to screw around with entity names, but asumes a UTF-8 clean workflow.
like image 171
martineno Avatar answered Oct 02 '22 16:10

martineno