Using kramdown, it seems like this works well:
[I want this to link to foo](#foo)
....
....
{: id="foo"}
### Foo are you?
I see it's been mentioned that
[foo][#foo]
....
#Foo
works efficiently, but the former might be a good alternative for elements besides headers or else headers with multiple words.