Do anchors in urls affect ranking in seo?
<a href="website.com/cotton">link 1</a>
As oposed to:
<a href="website.com/cotton#green">link 2</a>
On SO it does not affect it on I think it is the same on other sites too.
The anchors do not affect the rankings in SEO.
Hard to say for sure but the semantic meaning of the anchor is to point to a specific point on a page so the browser can scroll to it automatically. If it is going to have SEO value it would most likely be limited to the small portion of the page that is associated with the anchor. That value would be very small thanks to the limited target area of the anchor as well as the huge potential for abuse. I wouldn't worry about the SEO aspects of it and use names that make sense so when that URL is loaded in a browser it makes sense to the user and also makes the life easier for whomever has to maintain that code in the future.