views:

69

answers:

3
+1  Q: 

html anchor: <a>

I just found that <a href="#comment:9"></a> can work the same as <a name="comment:9"></a>,

which is more standard?

A: 

The <a href="#comment:9"></a> seems to be more out there thereby preserving the essence of href there rather than name which is better/ideal for the form elements.

Sarfraz
A: 

If you are attempting to link to a target inside of a web page, you should use # which is standard. This makes the meaning unambiguous. Just because one browser makes the assumption about the later method doesn't mean that all do and that the ones that do now will continue to in the future.

Also here is a link to the Links in HTML documentation.

kainosnous
+1  A: 

One is not more "standard" than the other. They are both part of the HTML spec. The first one is a link to the second one. If you click on

<a href="#comment:9"></a>

then your browser will navigate to the part of the page defined by

<a name="comment:9"></a>

You may see the scrollbar move on your browser when this happens.

Asaph
The same thing,huh?
wamp
@wamp: Huh? The first is the *starting point*, and the second is the *destination*.
KennyTM