Entities

P

patrick j

Hi

I'm just constructing a web-site. I used to do it a fair bit some years
ago albeit in an amateur capacity (not being paid) but now I've decided
to do some more.

I'm wondering about an entity.

The entity for a smart double quote on the left is: “
The entity for a smart double quote on the right is: ”
The entity for a smart single quote on the left is: ‘
The entity for a smart single quote on the right is: ’

The entity for a "stupid" double quote is: "

But...

What is the entity for a single "stupid" quote?

I can't find it anywhere and I'm wondering if I'm missing something
very obvious :)

TIA
 
F

freemont

Hi

I'm just constructing a web-site. I used to do it a fair bit some years
ago albeit in an amateur capacity (not being paid) but now I've decided to
do some more.

I'm wondering about an entity.

The entity for a smart double quote on the left is: “ The entity for
a smart double quote on the right is: ” The entity for a smart
single quote on the left is: ‘ The entity for a smart single quote
on the right is: ’

The entity for a "stupid" double quote is: "

But...

What is the entity for a single "stupid" quote?

I can't find it anywhere and I'm wondering if I'm missing something very
obvious :)

TIA

Try '

Doesn't seem to be an entity for that one. Gotta use hex or decimal.
 
J

Jim Moe

' <- a single quote. It is technically an apostrophe: <'>. Just the
single character is valid.
 
J

Jukka K. Korpela

patrick said:
I'm wondering about an entity.

Are you sure you need entities?
The entity for a "stupid" double quote is: &quot;

It's never needed except in a contrived case where an attribute value
contains a "stupid" double quote and you want to use double quotes as a
delimiter of the value.
What is the entity for a single "stupid" quote?

&apos; in any XML-based version of HTML, and none in classic HTML

It's never needed except in a contrived case where an attribute value
contains a "stupid" single quote and you want to use single quotes as a
delimiter of the value. In classic HTML, you were supposed to use a
character reference (') in such a situation.

You didn't find it in the HTML 4.01 specification because it isn't there.
It's mentioned in the XHTML 1.0 specification, though, as a compatility
issue: http://www.w3.org/TR/xhtml1/#C_16
(It's not otherwise mentioned there explicitly, since &apos; is in XHTML
because it's part of XML, for some strange reason.)
 
P

patrick j

Are you sure you need entities?

I'm glad you have mentioned this because it might well be a better
question than my own :)

I'm returning to doing some html after a significant of not doing any
at all. When I was writing HTML before I used entities for "smart
quotes" and "stupid quotes" and all that kind of thing.

Maybe there is no need to use them these days at all...

So, if I don't use entities I'm wondering if the characters will
display fine in the various common browsers these days?
 
R

richard

patrick j said:
Hi

I'm just constructing a web-site. I used to do it a fair bit some years
ago albeit in an amateur capacity (not being paid) but now I've decided
to do some more.

I'm wondering about an entity.

The entity for a smart double quote on the left is: &ldquo;
The entity for a smart double quote on the right is: &rdquo;
The entity for a smart single quote on the left is: &lsquo;
The entity for a smart single quote on the right is: &rsquo;

The entity for a "stupid" double quote is: &quot;

But...

What is the entity for a single "stupid" quote?

I can't find it anywhere and I'm wondering if I'm missing something
very obvious :)


Two single quotes equals a double quote?
On the output no one would be able to see the difference.
But to do it right you should use the & version as above or insert the hex
value for one.
If you don't and run it through the validator, you'll probably get an error.
 
R

richard

Jukka K. Korpela said:
Are you sure you need entities?


It's never needed except in a contrived case where an attribute value
contains a "stupid" double quote and you want to use double quotes as a
delimiter of the value.


&apos; in any XML-based version of HTML, and none in classic HTML

It's never needed except in a contrived case where an attribute value
contains a "stupid" single quote and you want to use single quotes as a
delimiter of the value. In classic HTML, you were supposed to use a
character reference (') in such a situation.

You didn't find it in the HTML 4.01 specification because it isn't there.
It's mentioned in the XHTML 1.0 specification, though, as a compatility
issue: http://www.w3.org/TR/xhtml1/#C_16
(It's not otherwise mentioned there explicitly, since &apos; is in XHTML
because it's part of XML, for some strange reason.)

The apostrophe has always been a valid character as it has many valid uses.
Which should always be included in any html format.
Although I can't think of a valid reason why one would need to use it within
the text output other than for it's intended purpose.
 
R

richard

David Dorward said:
The apostrophe yes, but not an entity to represent it.

I was just thinking, how does the validator interpret something like using
an apostrophe as the first character of a word?
As in emulating certain syntax of coloquial phrases?
Perhaps as in <span> 'er </span>

Or is it simply overlooked as standard text?
 
L

Leif K-Brooks

richard said:
I was just thinking, how does the validator interpret something like
using an apostrophe as the first character of a word?
As in emulating certain syntax of coloquial phrases?
Perhaps as in <span> 'er </span>

Or is it simply overlooked as standard text?

Yes, it's 'overlooked as standard text', because it _is_ standard text.
It's an HTML validator, not a grammar checker.
 
J

Jukka K. Korpela

richard said:
Two single quotes equals a double quote?

Are you serious?
On the output no one would be able to see the difference.

Apparently you aren't. Are you perhaps richard the troll who used to post
under some other fake identity and now managed to get out from my killfile.
You're pathetic, even for a troll.
 
B

Beauregard T. Shagnasty

In said:
Are you serious?

In his mind.
Apparently you aren't. Are you perhaps richard the troll who used to
post under some other fake identity and now managed to get out from
my killfile. You're pathetic, even for a troll.

Yes, he is Richard the Stoopid, and he's come back after a long break.
(Not long enough...) This is verifiable by checking some of his old
haunts, such as misc.transport.* See also a query for (e-mail address removed)
(though why he thinks he is Don Johnson, I have no idea).

<http://groups.google.com/groups/profile?enc_user=tL23UwwAAADmd9Vk0NM5QscqzrTF8ETR>
 
A

Andreas Prilop

Are you serious?

Nobody thinks that a double quotation mark consists of
a pair of single quotation marks.
Why then do many people think that an ellipsis U+2026
consists of three periods?

Why should double quotation marks and ellipsis be treated
differently?
 
J

Jukka K. Korpela

Andreas said:
Nobody thinks that a double quotation mark consists of
a pair of single quotation marks.
Why then do many people think that an ellipsis U+2026
consists of three periods?

You're wonderful, Andreas. I made a probably useless comment to a troll's
message, and now you're turning this into an interesting discussion. You're
wonderful even when you are wrong...

The ellipsis U+2026 is a compatibility character, which is equivalent to a
sequence of three full stop (period) characters. Compatibility equivalence
does not mean identity, of course, but it means close resemblance and
potential replaceability. The double quotation marks have no compatibility
(or other) decompositions.
Why should double quotation marks and ellipsis be treated
differently?

Because the ellipsis is a character that _may_ be used instead of "..."
(three full stop characters) _if_ you regard it as suitable to express the
idea of spaced dots at the character level and not as a stylistic issue. You
could use <span class="ell">...</span> instead, with some CSS code that
reduces character specing (say, .ell { letter-spacing: 0.1em}). Some people
might even say that this is consistent with the idea of separating content
from presentation.

On the practical side, the ellipsis - whether written as character data as
such, using a suitable encoding, or as character reference … or as
entity reference &hellip; - works rather widely on the www, because it
belongs to the Windows Latin 1 character repertoire. So far so good.

But the glyph for the ellipsis is unsuitable in several fonts. It often has
the dots as close to each other as in "..." - or even closer! Even if you
check that the font you suggest in your CSS code has a good-looking
ellipsis, the user might view the page using some other font.

I think I also need to remark that at least according to the Chicago Manual
of Style, only some languages (such as English) use "spaced periods" whereas
e.g. French, Italian, and Spanish use "suspension points", which are three
normal full stop characters, with no special spacing. Thus, by using the
ellipsis character (even when the font implements it properly) you might end
up with using the typographic principles of a language other than the one
you use in your document.

P.S. You forgot to mention about setting followups in the message body, so
I've temporarily added alt.html and now again set f'ups to c.i.w.a.misc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,477
Members
44,898
Latest member
BlairH7607

Latest Threads

Top