° - is it dependable?

Discussion in 'HTML' started by still just me, Nov 19, 2007.

  1. How universal is this symbol? Can I depend on it's implementation at
    all or should I just superscript a small font ?

    Thanks,
    still just me, Nov 19, 2007
    #1
    1. Advertising

  2. still just me

    cwdjrxyz Guest

    Re: ° - is it dependable?

    On Nov 18, 8:19 pm, still just me <> wrote:
    > How universal is this symbol? Can I depend on it's implementation at
    > all or should I just superscript a small font ?


    For recent browsers, I find the named entity for the degree symbol
    works on IE6, Firefox, SeaMonkey, Opera, and Safari for Windows
    browers. It also works on the W3C Amaya browser and a simulator for
    the old MSNTV box.

    For older browsers Appendix C: Special Characters, Powell's HTML &
    XHTML, 4th ed. supplies the following support data:

    Netscape: 3 to 7;
    IE: 3 to 6;
    Opera: 4.02 to 7;
    MSNTV (this is for the Bowser browser in the old WebTV set top box.
    The fairly new MSNTV box uses a watered down IE6 browser.)

    One can instead use a numbered entity with the number being 176. This
    works for the same browsers as the named entity with the addition of
    support for Netscape 1 and 2. About the only ones who would have
    Netscape 1 or 2 are collectors of antique browsers. About a year ago,
    and likely still, there was a site I found for downloading antique
    Netscape browsers. If something is old, there usually are at least a
    few people who will want to collect it.
    cwdjrxyz, Nov 19, 2007
    #2
    1. Advertising

  3. Re: &deg; - is it dependable?

    cwdjrxyz wrote:

    > For recent browsers, I find the named entity for the degree symbol
    > works on IE6, Firefox, SeaMonkey, Opera, and Safari for Windows
    > browers. It also works on the W3C Amaya browser and a simulator for
    > the old MSNTV box.


    It's worth noting that for XHTML, decimal character references are
    normally preferable to named entities. This is because non-validating XML
    parsers (including most web browsers) do not process the file's DTD, which
    is where entities (except for the five predefined XML entities: &amp; &lt;
    &gt; &quot; &apos;) are defined.

    In practice, most browsers do have workarounds which apply their
    knowledge of HTML entities to XHTML, but it's a bad idea to rely on
    browser workarounds.

    For an example of a browser which *doesn't* do this workaround, take a
    look at an XHTML file (sent with an XML MIME type) in Opera 6.0. Named
    entities such as &deg; are not understood. But if you send the file with
    an HTML MIME type, the entities magically come to life. This is not a bug:
    in fact, it's being too strict for its own good! This behaviour was
    changed in Opera 7.0.

    --
    Toby A Inkster BSc (Hons) ARCS
    [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
    [OS: Linux 2.6.12-12mdksmp, up 12 days, 15:42.]

    USD/EUR Exchange Rate Graph
    http://tobyinkster.co.uk/blog/2007/11/18/usd-eur/
    Toby A Inkster, Nov 19, 2007
    #3
  4. Scripsit still just me:

    > How universal is this symbol?


    Which "this symbol"? It's poor style and poor communication to refer to a
    heading in copy text.

    The notation &deg; is not really a symbol but a notation, an entity
    reference. Did you mean to ask about the entity reference, or about the
    DEGREE SIGN character (°)? There's normally no reason to use the entity
    reference in HTML authoring, since DEGREE SIGN is part of the iso-8859-1
    character repertoire, and you probably use (or can use) the iso-8859-1
    encoding.

    > Can I depend on it's implementation at
    > all or should I just superscript a small font ?


    A browser that does not get the DEGREE SIGN right, whether it is included as
    such in the encoding used or written as an entity reference, is so broken
    that it makes little sense to try to cover such browsers. The only thing I
    might really be worried about is that speech or Braille rendering might have
    difficulties with it.

    But your question "should I just superscript a small font" suggests that
    your real question might not have anything to do with the degree sign, which
    is _not_ a superscript. Specifically, it is _not_ superscript 0 (zero), it
    is _not_ superscript o, and it is _not_ masculine ordinal indicator as used
    e.g. in Spanish (e.g., 1º = primero), even though it may, by chance, look
    much the same or identical.

    So where would you use &deg;? This is correct usage:
    45&deg; angle
    32 &deg;C (= 32 degrees centigrade)

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Nov 19, 2007
    #4
  5. Re: &deg; - is it dependable?

    On Mon, 19 Nov 2007 08:53:11 +0000, Toby A Inkster
    <> wrote:

    >cwdjrxyz wrote:
    >
    >> For recent browsers, I find the named entity for the degree symbol
    >> works on IE6, Firefox, SeaMonkey, Opera, and Safari for Windows
    >> browers. It also works on the W3C Amaya browser and a simulator for
    >> the old MSNTV box.

    >
    >It's worth noting that for XHTML, decimal character references are
    >normally preferable to named entities. This is because non-validating XML
    >parsers (including most web browsers) do not process the file's DTD, which
    >is where entities (except for the five predefined XML entities: &amp; &lt;
    >&gt; &quot; &apos;) are defined.
    >
    >In practice, most browsers do have workarounds which apply their
    >knowledge of HTML entities to XHTML, but it's a bad idea to rely on
    >browser workarounds.
    >
    >For an example of a browser which *doesn't* do this workaround, take a
    >look at an XHTML file (sent with an XML MIME type) in Opera 6.0. Named
    >entities such as &deg; are not understood. But if you send the file with
    >an HTML MIME type, the entities magically come to life. This is not a bug:
    >in fact, it's being too strict for its own good! This behaviour was
    >changed in Opera 7.0.


    Thanks all.
    still just me, Nov 20, 2007
    #5
    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. msorion
    Replies:
    5
    Views:
    2,810
    Jacqui or (maybe) Pete
    Jul 22, 2003
  2. point

    dependable select boxes

    point, Jul 21, 2003, in forum: Javascript
    Replies:
    4
    Views:
    184
    point
    Jul 22, 2003
  3. lyoute
    Replies:
    11
    Views:
    458
    David K. Wall
    Feb 3, 2004
Loading...

Share This Page