Click here to get back home

XHTML 1.0 Strict and the Apostrophe

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
XHTML 1.0 Strict and the Apostrophe MikeC 02-15-2008
Posted by MikeC on February 15, 2008, 11:12 am
Please log in for more thread options
Hi, I'm having trouble finding the authoritative answer on whether to
use the Character Entity Reference apos or the Numeric Character
Reference #39 or #8217 as we move from HTML to XHTML 1.0 Strict. I've
read so many contradicting opinions that I can't tell what would be
most appropriate for our situation.

It is vitally important that we maintain as much backward
compatibility and accessibility as possible.

W3C says, in http://www.w3.org/TR/xhtml1/#C_16,

"The named character reference ' (the apostrophe, U+0027) was
introduced in XML 1.0 but does not appear in HTML. Authors should
therefore use ' instead of ' to work as expected in HTML 4
user agents."

But it doesn't speak to ’ Should we give preference to '
over ’ as well? Incidentally, when I use HTMLTidy, the
apostrophe is replaced with ’.

We have several coders and, thus, a variety of ways the apostrophe has
been coded. I would really like to solve this once and for all and
provide a standard.

TIA,
MikeC

Posted by Harlan Messinger on February 15, 2008, 11:39 am
Please log in for more thread options
MikeC wrote:
> Hi, I'm having trouble finding the authoritative answer on whether to
> use the Character Entity Reference apos or the Numeric Character
> Reference #39 or #8217 as we move from HTML to XHTML 1.0 Strict. I've
> read so many contradicting opinions that I can't tell what would be
> most appropriate for our situation.
>
> It is vitally important that we maintain as much backward
> compatibility and accessibility as possible.
>
> W3C says, in http://www.w3.org/TR/xhtml1/#C_16,
>
> "The named character reference ' (the apostrophe, U+0027) was
> introduced in XML 1.0 but does not appear in HTML. Authors should
> therefore use ' instead of ' to work as expected in HTML 4
> user agents."

Are you using the apostrophe character to delimited character strings?
If not, then you don't need to escape them at all.

Otherwise,  is guaranteed to work, while IE6 doesn't recognize '.

Posted by Andreas Prilop on February 15, 2008, 11:42 am
Please log in for more thread options
On Fri, 15 Feb 2008, MikeC wrote:

> Hi, I'm having trouble finding the authoritative answer on whether
> to use the Character Entity Reference apos

' is not well supported among user agents. And there is
no point in using this entity reference.

> or the Numeric Character Reference #39 or #8217

' is the "ASCII apostrophe". This is a technical character
and you *must* use it in HTML, CSS, programming languages, etc.
You cannot use the "typographical" or "curly" apostrophe.
It is seldom necessary to replace it with ' in HTML.

For "normal" text (as opposed to source text), you should
always use ’ as well as curly quotation marks,
“ and ” .

> as we move from HTML to XHTML 1.0 Strict.

Wone wonders why.

--
Solipsists of the world - unite!

Posted by Harlan Messinger on February 15, 2008, 11:47 am
Please log in for more thread options
Andreas Prilop wrote:
> On Fri, 15 Feb 2008, MikeC wrote:
>
>> Hi, I'm having trouble finding the authoritative answer on whether
>> to use the Character Entity Reference apos
>
> ' is not well supported among user agents. And there is
> no point in using this entity reference.
>
>> or the Numeric Character Reference #39 or #8217
>
> ' is the "ASCII apostrophe". This is a technical character
> and you *must* use it in HTML, CSS, programming languages, etc.
> You cannot use the "typographical" or "curly" apostrophe.
> It is seldom necessary to replace it with ' in HTML.

But it's absolutely necessary if you're using it as your attribute value
delimiter.

>
> For "normal" text (as opposed to source text), you should
> always use ’ as well as curly quotation marks,
> “ and ” .

Is Google handling these correctly? I know a while back I'd read that it
wasn't, and they *ought* to have corrected this, but I haven't seen an
update.

Posted by Andreas Prilop on February 15, 2008, 12:13 pm
Please log in for more thread options
On Fri, 15 Feb 2008, Harlan Messinger wrote:

>> It is seldom necessary to replace it with ' in HTML.
>
> But it's absolutely necessary if you're using it as your
> attribute value delimiter.

You can use both " and ' for attributes.

>> For "normal" text (as opposed to source text), you should
>> always use ’ as well as curly quotation marks,
>> “ and ” .
>
> Is Google handling these correctly?

What do you mean by "correctly"? All kind of quotation marks
and dashes are ignored when indexing pages. And you cannot
search for them either.

--
Solipsists of the world - unite!

Similar ThreadsPosted
utf-8 and xhtml 1.0 strict October 28, 2004, 7:26 am
xhtml vs html 4 strict May 21, 2005, 5:23 pm
Strict XHTML and div question July 14, 2005, 7:07 pm
What to use intead of taget_new in XHTML/Strict July 19, 2004, 7:41 am
image maps + xhtml strict October 23, 2004, 9:16 pm
Valid XHTML strict messed up in IE Mac December 20, 2004, 7:13 pm
XHTML 1.0 Strict validation problem November 11, 2005, 10:30 am
HTML 4.01 strict / transitional vs. XHTML 1.0 September 18, 2005, 3:10 pm
ampersand in urls when using xhtml 1.0 strict December 17, 2007, 8:30 am
Validation: XHTML Transitional vs. HTLM 4.01 Strict July 23, 2004, 6:10 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap