You are here: Re: ° - is it dependable? « HTML « IT news, forums, messages
Re: ° - is it dependable?

Posted by Toby A Inkster on 11/19/07 08:53

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: & <
> " ') 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 ° 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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация