Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it good practice to use typographic quotes on web pages?

Lately I have been seeing an increasing number of design articles encouraging the use of typographic quotes (Curly Quotes) for use in web pages over straight quotes.

While I agree typographically, that correct quotes are that much more appealing and add a nice touch to a design, I wonder if it is actually better practice from an encoding standpoint.

I have found that these quotes do not copy and paste across documents as well, Do not necessarily scrape as well, and can end up with the annoying missing character symbol. Never mind when they are used in sample code blocks, I hate that.

I am not very knowledgeable on text encodings so I am wondering if anyone has any advice on this subject?

Is " better or more reliable then “

Edit: This issue mainly applies to content areas, where <q> or <blockquote> is semantically not the best option. Also, things like plurals and such.

like image 899
user73119 Avatar asked Mar 21 '09 09:03

user73119


1 Answers

You should probably use the entities &ldquo; (left double quote) and &rdquo; (right double quote) instead of cut and pasting whatever you copy into the clipboard from Word. You'll find it will work just about everywhere then.

The same goes for short and long hypens (&ndash; and &mdash; respectively.)

(I've spent far too much time cleaning these up in HTML. :-)

Here is a good reference of all the available HTML entities.

EDIT: In answer to the questions: “Is there any difference is using &#8220; instead of &rdquo; ? also do any of these entities require a particular charset? Should I be using UTF-8?

I don't think there is any difference. Here in the HTML 4.0 specification gives a link to the HTMLSpecial.ent DTD which includes the following:

<!ENTITY rdquo   CDATA "&#8221;" -- right double quotation mark,
                                    U+201D ISOnum -->

So I'd say they are equivalent. As to whether they belong to a particular charset, section 5.3.1 of the HTML 4.0 spec says:

Numeric character references specify the code position of a character in the document character set.

And 5.1 says:

…so HTML uses the much more complete character set called the Universal Character Set (UCS), defined in [ISO10646]. … The character set defined in [ISO10646] is character-by-character equivalent to Unicode 2.0 ([UNICODE]).

I'm no expert on Unicode, but I think that pretty much says you can use pretty much any Unicode based character encoding.

like image 197
Evan Avatar answered Oct 20 '22 11:10

Evan