Dirk Diggler
Dirk Diggler

Reputation: 865

For HTML entities, should I use the named syntax or numerical syntax?

For example, to represent <, is it better to use &gt; or &#60;, in terms of browser support?

This page makes the claim that one should avoid name syntax because "Not all browsers may support the newer entity names (160-191 range)". Does this advice still hold true for modern browsers (IE7+, FF3.5+, Safari, Chrome, Opera)?

(My IDE automatically converts special characters in HTML to entities, but only using the named syntax, so I'd like to use named entities for this reason, or find a utility that converts characters to their entities using numerical syntax.)

Upvotes: 1

Views: 708

Answers (1)

Diodeus - James MacFarlane
Diodeus - James MacFarlane

Reputation: 114447

These days, it doesn't really matter which you use. Named entities are easier to remember and cover 99% of what you'll ever use anyway.

Here's a handy guide and converter:

http://www.texaswebdevelopers.com/examples/xmlentities/xml_entities.asp

Upvotes: 1

Related Questions