anchor names syntax

J

Jeff Thies

I have a series of links that reference anchors in the same page. Is it
legal to have spaces in the names? Such things would never work in the
url, but work here.

ex:

<a href="#section 1">jump to section 1</a>

....

<a name="section 1"></a>

Jeff
 
E

Eric Biller

Jeff said:
I have a series of links that reference anchors in the same page. Is it
legal to have spaces in the names?

Bad Style!
Imagine someone who wants to bookmark this reference. Propably he won't
experience problems with it (depends on the browser) but all spaces will be
converted to %20. Never use spaces in identifier, names or references. Try
to convert them to underscores if you need it.
Such things would never work in the url, but work here.

You cannot say this in general. Sometimes spaces will be converted to %20
sometimes not. I am not sure if it depends on the browser or server, but it
depends.

greetz
Eric Biller
 
J

Jeff Thies

Eric said:
Jeff Thies wrote:




Bad Style!

Illegal syntax or just bad style?


Imagine someone who wants to bookmark this reference. Propably he won't
experience problems with it (depends on the browser) but all spaces will be
converted to %20.


It's a site map. Nobody is going to bookmark an anchor in a sitemap!

Jeff


Never use spaces in identifier, names or references. Try
 
G

Greg Schmidt

It's a site map. Nobody is going to bookmark an anchor in a sitemap!

If it's a big site, and someone is interested in a certain subset of it,
they might well bookmark the anchor to get them back to that area very
quickly. I've never done it myself, but "never say nobody".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top