Loans - Gabriel garcia marquez - Credit Card - Life Insurance - MySpace Layouts

PDA

View Full Version : A question on a particular, well, I don't know what is it called


tayiper
Sep 27th 2006, 8:32 am
OK, I surely know why & stands for & (or should I rather say "replaces" it when the code is rendered), i.e. stands for an ampersand character ...


/UPDATE: Oh, are these maybe called "entities", at least I think I remember hearing/readin that term.


But then I started to think; what about © for ©, and " for " chars?? I mean, if there is no way to display an ampersand without using the entity, this is certainly not true for these ones.


thanks, tayiper

penagate
Sep 27th 2006, 9:21 am
Hi,

You can display any character using a character reference: &#dec; or &#xhex; specifying the character code.

The named entities are used for particular characters. However a few browsers (Safari in particular, although I am not sure if this is still true) don't understand all of them. So © is safer than © as it is more likely to be understood.

SGML (and XML by derivation) language applications can specify their own named character entities.

" is useful for inserting double quote marks into an attribute value, for example:
<element attribute="value, &quot;quoted text&quot;" />
If you have used C-based programming languages you will be familiar with escape sequences in strings; you can liken these principles.

Hope that helps you.

- P