When one wants to refer to some part of a webpage with the \"http://example.com/#foo\" method, should one use
http://example.com/#foo
F
The whole "named anchor" concept uses the name attribute, by definition. You should just stick to using the name, but the ID attribute might be handy for some javascript situations.
As in the comments, you could always use both to hedge your bets.