So I'm probably overthinking this, as I do with everything. But I'm just curious to what others think.
In general, naming a HTML anchor link should be short and related, but if you have a table of content, what would then be best practice (from both seo as technical point of view):
- matching the exact heading
- leave out words with little meaning (such as 'in', 'and')
For example: if your table of content looks like this
- an example about the anchor links
- creating anchor links on your page
So you would make an anchor link for '1. an example about the anchor links'. Should it be
#example-anchor-links or the exact phrase
On one hand, keeping it short as possible seems like good practise, but on the other hand it might be better to make it an exact match.
Just curious how other people think about this, because I sometimes see the first example and sometimes the second. It might not make huge differences, but since I'm just starting implementing it, I'd rather have the best way right now and be consistent with that for the future.