[thelist] Rules of Using & and &, etc...
aardvark
roselli at earthlink.net
Wed May 10 12:49:14 2000
- the & should be used in all instances of the '&' on a page,
even in a URL (http://foo.com/foo.asp?foo=1&foo2=2 for
example)... that being said, i don't see it done much, and it takes
me a while to use it... however, now that so many of my sites are
db-driven, i replace the & with the & when it goes into the db...
- the " follow the same basic rules as the &... i now
always replace " with this with content going into a db... otherwise
it can mess up my SQL queries...
- you should *always* use a > or < if you want to display a '<'
or a '>' on a page...if you don't, a browser may (correctly) assume
it is a tag...
- as for numeric vs. character entity... i use the numeric for all but
the &, the <, and the >... i've found that some older or
alternative browsers choke on even the " and ©, among
all the others...
> From: Gregory.John.Toland@ccmail.census.gov
>
> What are the rules for using & as opposed to the actual &
> character in HTML coding? I noticed sometimes people (in-house) have
> the symbol & in their code and other times they have used &. The
> same for " versus the symbol " or < versus the symbol <. The
> general question is when do you use the character & and when do you
> use the numeric entity (&) or the character entity (&)?
> Thanks for any help you can give.