[thelist] href=# versus href=JavaScript.....

Aylard JA (James) jaylard at equilon.com
Thu Feb 22 10:45:14 CST 2001


Rob,

> This got me thinking - is there any reason you couldn't do this:
> <a name="foo" href="#foo" onClick=".....">something</a>
> ...and get rid of the extra anchor?

	Actually, this is legal HTML. The W3C HTML 4.01 recommendation,
section 12.2 (http://www.w3.org/TR/html401/struct/links.html#h-12.2), even
provides a similar example. The caveat is that each name value must be
unique within a document, so you can't simply reuse "foo", for example, over
and over again.

James Aylard




More information about the thelist mailing list