Entities

Discussion in 'HTML' started by patrick j, Sep 24, 2006.

  1. patrick j

    patrick j Guest

    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


    --
    Patrick
    Brighton, UK
     
    patrick j, Sep 24, 2006
    #1
    1. Advertising

  2. patrick j

    freemont Guest

    On Sun, 24 Sep 2006 02:06:00 +0100, patrick j wrote:

    > 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.

    --
    "Because all you of Earth are idiots!"
    ¯`·.¸¸.·´¯`·-> freemont© <-·´¯`·.¸¸.·´¯
     
    freemont, Sep 24, 2006
    #2
    1. Advertising

  3. patrick j

    Jim Moe Guest

    freemont wrote:
    >>
    >> What is the entity for a single "stupid" quote?
    >>

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

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)
     
    Jim Moe, Sep 24, 2006
    #3
  4. patrick j wrote:

    > 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.)

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Sep 24, 2006
    #4
  5. patrick j

    patrick j Guest

    On Sun, 24 Sep 2006 06:00:53 +0100, Jukka K. Korpela wrote
    (in article <LhoRg.18733$>):

    >> I'm wondering about an entity.

    >
    > 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?

    --
    Patrick
    Brighton, UK
     
    patrick j, Sep 24, 2006
    #5
  6. patrick j

    richard Guest

    "patrick j" <> wrote in message
    news:...
    > 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.
     
    richard, Sep 24, 2006
    #6
  7. patrick j

    richard Guest

    "Jukka K. Korpela" <> wrote in message
    news:LhoRg.18733$...
    > patrick j wrote:
    >
    >> 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.)


    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.
     
    richard, Sep 24, 2006
    #7
  8. richard wrote:

    >> You didn't find it in the HTML 4.01 specification because it isn't there.


    > The apostrophe has always been a valid character as it has many valid
    > uses.


    The apostrophe yes, but not an entity to represent it.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Sep 24, 2006
    #8
  9. patrick j

    richard Guest

    "David Dorward" <> wrote in message
    news:ef6cf2$kq2$1$...
    > richard wrote:
    >
    >>> You didn't find it in the HTML 4.01 specification because it isn't
    >>> there.

    >
    >> The apostrophe has always been a valid character as it has many valid
    >> uses.

    >
    > 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?
     
    richard, Sep 24, 2006
    #9
  10. richard wrote:
    > 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.
     
    Leif K-Brooks, Sep 24, 2006
    #10
  11. richard wrote:

    > 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.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Sep 24, 2006
    #11
  12. In alt.html, Jukka K. Korpela wrote:

    > richard wrote:
    >
    >> Two single quotes equals a double quote?

    >
    > Are you serious?


    In his mind.

    >> 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.


    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
    (though why he thinks he is Don Johnson, I have no idea).

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

    --
    -bts
    -Motorcycles defy gravity; cars just suck.
     
    Beauregard T. Shagnasty, Sep 24, 2006
    #12
  13. On Sun, 24 Sep 2006, Jukka K. Korpela wrote:

    >> Two single quotes equals a double quote?

    >
    > 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?
     
    Andreas Prilop, Sep 26, 2006
    #13
  14. Andreas Prilop wrote:

    > On Sun, 24 Sep 2006, Jukka K. Korpela wrote:
    >
    >>> Two single quotes equals a double quote?

    >>
    >> 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?


    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.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Sep 26, 2006
    #14
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. R Paley
    Replies:
    2
    Views:
    514
    Paul Uiterlinden
    Nov 20, 2004
  2. Replies:
    1
    Views:
    444
    Mike Treseler
    Jan 14, 2005
  3. Andy Peters

    instances of entities vs components

    Andy Peters, Jul 12, 2005, in forum: VHDL
    Replies:
    1
    Views:
    570
    Mike Treseler
    Jul 13, 2005
  4. Joergen Bech
    Replies:
    2
    Views:
    4,446
    Joergen Bech
    Jun 14, 2005
  5. Jim Higson
    Replies:
    3
    Views:
    235
    Eric Amick
    Jul 25, 2004
Loading...

Share This Page